stationary.test: Stationary Test for Univariate Time Series
Performs stationary test for a univariate time series.
stationary.test(x, method = c("adf", "pp", "kpss"), nlag = NULL, type = c("Z_rho", "Z_tau"), lag.short = TRUE, output = TRUE)
a numeric vector or univariate time series.
a character indicating which test to use. The default is
"adf" by Augmented Dickey-Fuller test.
the lag order to calculate the test statistic, only valid for
method = "adf". See
adf.test for more details.
the test type, only valid for
method = "pp".
pp.test for more details.
a logical value, only valid for
method = "pp" or
kpss.test for more details.
a logical value indicating to print the results in R console.
The default is
This function combines the existing functions
kpss.test for testing the stationarity of a univariate time series
x <- arima.sim(list(order = c(1,0,0),ar = 0.2),n = 100)
stationary.test(x) # same as adf.test(x)
stationary.test(x, method = "pp") # same as pp.test(x)
stationary.test(x, method = "kpss") # same as kpss.test(x)