Description Usage Arguments Value Examples
View source: R/adf_test_summary.r
Run ADF test for unit roots on all columns of a data frame.
1 | adf_test_summary(df, p_select = "BIC")
|
p_select |
Method for selecting number of lags to include in the test regression. Possible values: "AIC", "BIC" |
A data frame with 3 rows and ncol(df) columns.
1 2 3 4 5 6 7 8 9 10 | # Example 1: We test it on iid white noises and a random walk.
# As expected, white_noise's p-value is smaller than 0.01, so it is stationary. But random walk is not.
set.seed(10)
df <- data.frame(white_noise = rnorm(100), random_walk = cumsum(rnorm(100)))
adf_test_summary(df)
# Example 2: We test it on a "trend stationary" time series.
set.seed(10)
df <- data.frame(trend_s = 0.8 * seq(1:20) + rnorm(20))
adf_test_summary(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.