Learn R Programming

QR.break (version 1.0.1)

sq.test.0vs1: Test for a Structural Break in a Conditional Quantile

Description

The function implements a break test to evaluate whether a single structural break exists at a given quantile.

Usage

sq.test.0vs1(y, x, v.tau, n.size = 1)

Value

A numeric value representing the test statistic for the presence of a structural break.

Arguments

y

A numeric vector of dependent variables (\(NT \times 1\)).

x

A numeric matrix of regressors (\(NT \times p\)).

v.tau

A numeric value representing the quantile level.

n.size

An integer specifying the size of the cross-section (\(N\)).

References

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.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab