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.
Value
A list containing the test results, including:
data
: Thedata
argument.alpha
: The significance level as specified in thealpha
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
: IfTRUE
, the null hypothesis was rejected at significancealpha
.
Details
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\).
References
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
Examples
data <- rnorm(n = 100, mean = 100, sd = 10)
eda_pp_test(data)
#> $data
#> [1] 105.76548 116.35644 105.87302 91.87373 100.21493 102.16915 106.43384
#> [8] 90.75542 112.09305 115.66475 106.29210 93.57340 109.91148 123.90197
#> [15] 111.88599 107.95127 112.67272 96.37174 90.85030 109.63619 110.11232
#> [22] 103.51880 85.45366 96.87146 101.49090 85.91269 110.95705 89.93695
#> [29] 100.82613 97.13996 101.50056 91.73811 93.37605 103.32282 115.90949
#> [36] 105.40615 78.21858 100.81197 92.78968 83.66820 113.59610 107.43217
#> [43] 105.51555 95.14892 110.21334 103.11580 103.84172 97.51773 89.01770
#> [50] 98.42764 95.09492 90.94731 91.61404 102.31428 98.29435 112.32145
#> [57] 85.10743 95.72899 91.82995 84.94320 93.22315 86.30266 94.42601
#> [64] 92.61220 102.89779 106.08334 108.82450 109.42153 95.22151 100.84429
#> [71] 88.10724 107.37773 100.58236 94.05796 118.65775 102.38358 96.12942
#> [78] 89.13372 89.66338 82.05767 86.20263 100.00840 113.10889 104.46057
#> [85] 96.14615 91.31060 99.45665 117.31574 85.14095 93.78140 108.40636
#> [92] 106.62350 89.15688 107.41433 98.99308 103.05388 113.90169 98.43064
#> [99] 102.31027 106.38974
#>
#> $alpha
#> [1] 0.05
#>
#> $null_hypothesis
#> [1] "The time series has a unit root (stochastic trend)."
#>
#> $alternative_hypothesis
#> [1] "The time series is trend-stationary."
#>
#> $statistic
#> [1] -83.75394
#>
#> $p_value
#> [1] 0.01
#>
#> $reject
#> [1] TRUE
#>