Description Usage Arguments Details Value Author(s) References See Also Examples

Unit root test based upon the weighted symmetric estimator of Pantula, Gonzales-Farias and Fuller

1 2 |

`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 |

The weighted symmetric estimator *rho_ws* of Pantula,
Gonzales-Farias and Fuller is given as follows:

*
rho_ws = sum(Y[1:(n-1)]*Y[2:n])/(sum(Y[2:(n-1)]^2) + (1/n)*sum(Y^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."

`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. |

Matthew Clegg [email protected]

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
# 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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.