Description Usage Arguments Value Examples
View source: R/teststatistics.R
Performs the small-b unit root test
1 | smallb.test(y, B = floor(length(y)^0.7), HC = TRUE)
|
y |
Vector to be tested for a unit root. |
B |
An integer defining the blocklength; default is T^{0.7}. |
HC |
A logical variable defining whether the heteroskedasticity robust version (HC = TRUE) or the homoskedasticity version (HC = FALSE) should be used; default is HC = TRUE. |
A list containing the following components:
teststatistic |
The value of the small-b test statistic. |
p.value |
The p-value of the small-b test against stationarity. |
1 2 3 4 5 6 7 8 | series1 <- rnorm(100) + c(rep(0,60), rep(5, 40))
smallb.test(series1)
series2 <- cumsum(rnorm(100)) + c(rep(0,60), rep(5, 40))
smallb.test(series2)
## autocorrelation robust test
series3 <- filter(rnorm(300),0.8,"recursive")
series3.pw <- get.prewhitened(series3, p = 1)
smallb.test(series3.pw)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.