ndiffs {forecast}R Documentation

Number of differences

Description

Uses a KPSS test for the null hypothesis that x has a stationary root against a unit-root alternative. Returns the least number of differences required to pass the test at the level alpha.

Usage

ndiffs(x,alpha=0.05)

Arguments

x A univariate time series
alpha Level of the test

Value

An integer.

Author(s)

Rob J Hyndman

See Also

kpss.test

Examples

ndiffs(WWWusage)

[Package forecast version 1.23 Index]