report_ndiffs | R Documentation |
Report number of differences to make time series stationary (vectorized)
report_ndiffs( x, test = c("kpss", "adf", "pp"), term = c("level", "trend"), alpha = 0.05, na_rm = TRUE )
x |
List-like object with vectors of the series to be tested |
test |
Type of unit root test to use, see forecast::ndiffs |
term |
Specification of the deterministic component in the regression, see forecast::ndiffs |
alpha |
Level of the test, possible values range from 0.01 to 0.1 |
na_rm |
Remove NAs from x? |
Tibble with variable name from x and the number of differences found
ts1 <- as.vector(arima.sim(list(order = c(1, 1, 0), ar = 0.7), n = 19)) ts2 <- rnorm(20) report_ndiffs(data.frame(ts1 = ts1, ts2 = ts2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.