Performs the KPSS unit root test on annual maximum series data. The null hypothesis is that the time series is trend-stationary with a linear deterministic trend and constant drift. The alternative hypothesis is that the time series has a unit root (also known as a stochastic trend).
eda_kpss_test(data, alpha = 0.05)
A list containing the test results, including:
data
: The data
argument.
alpha
: The significance level as specified in the alpha
argument.
null_hypothesis
: A string describing the null hypothesis.
alternative_hypothesis
: A string describing the alternative hypothesis.
statistic
: The KPSS test statistic.
p_value
: The interpolated p-value. See the details for more information.
reject
: If TRUE
, the null hypothesis was rejected at significance alpha
.
Numeric vector of observed annual maximum series values. Must be strictly positive, finite, and not missing.
Numeric scalar in \([0.01, 0.1]\). The significance level for confidence intervals or hypothesis tests. Default is 0.05.
The implementation of the KPSS test is based on the 'aTSA' package, which interpolates a significance table from Hobijn et al. (2004). Therefore, a result of \(p = 0.01\) implies that \(p \leq 0.01\) and a result of \(p = 0.10\) implies that \(p \geq 0.10\).
Hobijn, B., Franses, P.H. and Ooms, M. (2004), Generalizations of the KPSS-test for stationarity. Statistica Neerlandica, 58: 483-502.
Kwiatkowski, D.; Phillips, P. C. B.; Schmidt, P.; Shin, Y. (1992). Testing the null hypothesis of stationarity against the alternative of a unit root. Journal of Econometrics, 54 (1-3): 159-178.
eda_pp_test()
data <- rnorm(n = 100, mean = 100, sd = 10)
eda_kpss_test(data)
Run the code above in your browser using DataLab