dq.test.0vs1 | R Documentation |
This procedure computes test statistics for detecting a single structural break within a range of quantiles. The null hypothesis is that there is no break in any quantile in the specified range; the alternative is that at least one quantile in the range is affected by a break.
dq.test.0vs1(y, x, q.L, q.R, n.size = 1)
y |
A numeric vector of dependent variables ( |
x |
A numeric matrix of regressors ( |
q.L |
A numeric value specifying the lower bound of the quantile range. |
q.R |
A numeric value specifying the upper bound of the quantile range. |
n.size |
An integer specifying the size of the cross-section ( |
A numeric scalar representing the DQ test statistic.
Koenker, R. and Bassett Jr, G. (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")]
## qunatile range (left and right limits)
q.L = 0.2
q.R = 0.8
## N
n.size = 1
# dq-test
result = dq.test.0vs1(y, x, q.L, q.R, n.size)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.