Performs a test for the existence of a unit root in the vector.
unitroot_kpss(x, type = c("mu", "tau"), lags = c("short", "long", "nil"), ...)
unitroot_pp(
x,
type = c("Z-tau", "Z-alpha"),
model = c("constant", "trend"),
lags = c("short", "long"),
...
)
Arguments
- x
A vector to be tested for the unit root.
- type
Type of deterministic part.
- lags
Maximum number of lags used for error term correction.
- ...
Arguments passed to unit root test function.
- model
Determines the deterministic part in the test regression.
Value
A vector of numeric features for the test's statistic and p-value.
Details
unitroot_kpss
computes the statistic for the Kwiatkowski et al. unit root test with linear trend and lag 1.
unitroot_pp
computes the statistic for the Z-tau
version of Phillips & Perron unit root test with constant trend and lag 1.