Applies the Phillips–Perron (PP) test to check for a unit root in annual maximum series data. The null hypothesis assumes the time series contains a unit root (also known as a stochastic trend). The alternative hypothesis is that the time series is trend-stationary with a deterministic linear trend.
eda_pp_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 PP test statistic.
p_value
: Reported p-value from the test. 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 this test is based on the 'aTSA' package, which interpolates p-values from the table of critical values presented in Fuller W. A. (1996). The critical values are only available for \(\alpha \geq 0.01\). Therefore, a reported p-value of 0.01 indicates that \(p \leq 0.01\).
Fuller, W. A. (1976). Introduction to Statistical Time Series. New York: John Wiley and Sons
Phillips, P. C. B.; Perron, P. (1988). Testing for a Unit Root in Time Series Regression. Biometrika, 75 (2): 335-346
eda_kpss_test()
data <- rnorm(n = 100, mean = 100, sd = 10)
eda_pp_test(data)
Run the code above in your browser using DataLab