View source: R/sq.test.lvsl_1.R
sq.test.lvsl_1 | R Documentation |
This function tests the null hypothesis of L
breaks against the alternative hypothesis of L+1
breaks
in a single conditional quantile.
sq.test.lvsl_1(y, x, v.tau, n.size = 1, vec.date)
y |
A numeric vector of dependent variables ( |
x |
A numeric matrix of regressors ( |
v.tau |
A numeric value representing the quantile of interest. |
n.size |
An integer specifying the size of the cross-section ( |
vec.date |
A numeric vector of break dates estimated under the null hypothesis. |
The function sequentially tests for breaks by splitting the sample conditional on the
break dates under the null hypothesis. At each step, it applies sq.test.0vs1()
to compare
the hypothesis of no additional break against one more break.
A numeric value representing the test statistic.
Qu, Z. (2008). Testing for Structural Change in Regression Quantiles. Journal of Econometrics, 146(1), 170-184.
Oka, T. and Z. Qu (2011). Estimating Structural Changes in Regression Quantiles. Journal of Econometrics, 162(2), 248-267.
## data
data(gdp)
y = gdp$gdp
x = gdp[,c("lag1", "lag2")]
## quantile
v.tau = 0.8
# cross-sectional size
n.size = 1
## break date
vec.date = 146
## sq-test: 1 vs 2
result = sq.test.lvsl_1(y, x, v.tau, n.size, vec.date)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.