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

Unit root test based upon Breitung's variance ratio

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 |

Breitung's variance ratio is given by the formula:

*
rho = (1/T) * sum(cumsum(Y)^2)/sum(Y^2)*

where *T* is the length of the vector *Y*. (See equation (5)
of his paper.)

The advantage of Breitung's variance ratio is that, in contrast to the Dickey-Fuller test and other related tests, it is a nonparametric statistic. In simulations, it seems to perform favorably with respect to the Hurst exponent.

Simulation has been used to determine the distribution of the statistic, and table lookup is used to determine p-values.

If `detrend=TRUE`

, then a linear trend is removed from the data
prior to computing the estimator *rho*. A separate table has been
computed of the distribution of values of *rho* after detrending.

`bvr_rho`

returns the value *rho* of Breitung's variance
ratio.

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

Breitung, J. (2002).
Nonparametric tests for unit roots and cointegration.
*Journal of econometrics*, 108(2), 343-363.

Breitung, J. and Taylor, A.M.R. (2003)
Corrigendum to "Nonparametric tests for unit roots and cointegration"
[J. Econom. 108 (2002) 343-363]
*Journal of econometrics*, 117(2), 401-404.

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
bvr_rho(rnorm(100))
bvr.test(rnorm(100))
# The following should produce a high p-value
bvr_rho(cumsum(rnorm(100)))
bvr.test(cumsum(rnorm(100)))
# Test with an autoregressive sequence where rho = 0.8
bvr.test(rar1(100, a1=0.8))
# If there is a linear trend, bvr.test with detrend=FALSE
# is likely to find a unit root when there is none:
bvr.test(1:100 + rnorm(100))
bvr.test(1:100 + rnorm(100), detrend=TRUE)
# Display the power of the test for various values of rho and n:
bvr_power(a1=0.8, n=100, nrep=100)
bvr_power(a1=0.9, n=250, nrep=100)
bvr_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.