report_ndiffs: Report number of differences to make time series stationary...

report_ndiffsR Documentation

Report number of differences to make time series stationary (vectorized)

Description

Report number of differences to make time series stationary (vectorized)

Usage

report_ndiffs(
  x,
  test = c("kpss", "adf", "pp"),
  term = c("level", "trend"),
  alpha = 0.05,
  na_rm = TRUE
)

Arguments

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?

Value

Tibble with variable name from x and the number of differences found

Examples

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))

schoulten/ipca documentation built on May 27, 2022, 10:05 p.m.