sq.test.0vs1 | R Documentation |
The function implements a break test to evaluate whether a single structural break exists at a given quantile.
sq.test.0vs1(y, x, v.tau, n.size = 1)
y |
A numeric vector of dependent variables ( |
x |
A numeric matrix of regressors ( |
v.tau |
A numeric value representing the quantile level. |
n.size |
An integer specifying the size of the cross-section ( |
A numeric value representing the test statistic for the presence of a structural break.
Koenker, R. and G. Bassett Jr, (1978). Regression Quantiles. Econometrica, 46(1), 33–50.
Qu, Z. (2008). Testing for Structural Change in Regression Quantiles. Journal of Econometrics, 146(1), 170–184.
## data
data(gdp)
y = gdp$gdp
x = gdp[,c("lag1", "lag2")]
## quantile
v.tau = 0.8
# cross-sectional size
n.size = 1
# sq test: 0 vs 1
result = sq.test.0vs1(y, x, v.tau, n.size)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.