View source: R/dq.test.lvsl_1.R
dq.test.lvsl_1 | R Documentation |
This function performs a sequential test to determine whether the number of
breaks in a quantile regression model should be increased from L
to L+1
using
multiple quantiles.
dq.test.lvsl_1(y, x, q.L, q.R, n.size = 1, vec.date)
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 cross-sections ( |
vec.date |
A numeric vector ( |
This procedure tests for the existence of L
breaks against L+1
breaks
based on multiple quantiles:
H_0: L
breaks vs. H_1: L+1
breaks.
A numeric value representing the DQ test statistic.
Qu, Z. (2008). Testing for Structural Breaks in Regression Quantiles. Journal of Econometrics, 146(1), 170-184.
# Load data
data(gdp)
y = gdp$gdp
x = gdp[,c("lag1", "lag2")]
# Set quantile range (left and right limits)
q.L = 0.2
q.R = 0.8
# Set N parameter
n.size = 1
# Specify break date under H_0
vec.date = 146
# Run the test
result = dq.test.lvsl_1(y, x, q.L, q.R, n.size, vec.date)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.