Learn R Programming

fable (version 0.4.0)

unitroot_options: Options for the unit root tests for order of integration

Description

By default, a kpss test (via feasts::unitroot_kpss()) will be performed for testing the required first order differences, and a test of the seasonal strength (via feasts::feat_stl() seasonal_strength) being above the 0.64 threshold is used for determining seasonal required differences.

Usage

unitroot_options(
  ndiffs_alpha = 0.05,
  nsdiffs_alpha = 0.05,
  ndiffs_pvalue = ~feasts::unitroot_kpss(.)["kpss_pvalue"],
  nsdiffs_pvalue = ur_seasonal_strength(0.64)
)

Value

A list of parameters

Arguments

ndiffs_alpha, nsdiffs_alpha

The level for the test specified in the pval functions. As long as pval < alpha, differences will be added.

ndiffs_pvalue, nsdiffs_pvalue

A function (or lambda expression) that provides a p-value for the unit root test. As long as pval < alpha, differences will be added.

For the function for the seasonal p-value, the seasonal period will be provided as the .period argument to this function. A vector of data to test is available as . or .x.