pgff.test {egcm} | R Documentation |
Unit root test of Pantula, Gonzales-Farias and Fuller
Description
Unit root test based upon the weighted symmetric estimator of Pantula, Gonzales-Farias and Fuller
Usage
pgff.test(Y, detrend = FALSE)
pgff_rho_ws(Y, detrend = FALSE)
Arguments
Y |
A vector or zoo-vector |
detrend |
A boolean, which if TRUE, indicates that the test should
be performed after removing a linear trend from |
Details
The weighted symmetric estimator \rho_{WS}
of Pantula,
Gonzales-Farias and Fuller is given as follows:
\hat{\rho}_{WS}=\frac{\sum_{t=2}^n Y_{t-1} Y_t}{%
\sum_{t=2}^{n-1} Y_t^2 + n^{-1} \sum_{t=1}^n Y_t^2}
where n
is the length of the sequence Y
.
The authors give an associated pivotal statistic and derive the limiting distribution for it, however the approach taken in this implementation was
simply to determine the distribution of \rho_{WS}
through simulation.
Table lookup is used to determine the p-value associated with a given
value of the statistic.
If detrend=TRUE
, then a linear trend is removed from the data
prior to computing the estimator \rho_{WS}
. A separate table has been
computed of the distribution of values of \rho_{WS}
after detrending.
This unit root test is intended to identify autoregressive sequences of order one. However, the authors state that, "A Monte Carlo study indicates that the weighted symmetric estimator performs well in second order processes."
Value
pgff_rho_ws
returns the value \rho_{WS}
of the weighted
symmetric estimator.
pgff.test
returns a list with class "htest"
containing the following components:
statistic |
the value of the test statistic. |
parameter |
the truncation lag parameter. |
p.value |
the p-value of the test. |
method |
a character string indicating what type of test was performed. |
data.name |
a character string giving the name of the data. |
Author(s)
Matthew Clegg matthewcleggphd@gmail.com
References
Pantula, S. G., Gonzalez-Farias, G., and Fuller, W. A. (1994). A comparison of unit-root test criteria. Journal of Business & Economic Statistics, 12(4), 449-459.
See Also
Examples
# The following should produce a low p-value
pgff_rho_ws(rnorm(100))
pgff.test(rnorm(100))
# The following should produce a high p-value
pgff_rho_ws(cumsum(rnorm(100)))
pgff.test(cumsum(rnorm(100)))
# Test with an autoregressive sequence where rho = 0.8
pgff.test(rar1(100, a1=0.8))
# If there is a linear trend, pgff.test with detrend=FALSE
# is likely to find a unit root when there is none:
pgff.test(1:100 + rnorm(100))
pgff.test(1:100 + rnorm(100), detrend=TRUE)
# Display the power of the test for various values of rho and n:
pgff_power(a1=0.8, n=100, nrep=100)
pgff_power(a1=0.9, n=250, nrep=100)
pgff_power(a1=0.95, n=250, nrep=100)
# This is to be compared to the power of the adf.test at this level:
adf_power(a1=0.8, n=100, nrep=100)
adf_power(a1=0.9, n=250, nrep=100)
adf_power(a1=0.95, n=250, nrep=100)