sq.test.lvsl_1: Sequential Test for an Additional Break in a Conditional...

View source: R/sq.test.lvsl_1.R

sq.test.lvsl_1R Documentation

Sequential Test for an Additional Break in a Conditional Quantile

Description

This function tests the null hypothesis of L breaks against the alternative hypothesis of L+1 breaks in a single conditional quantile.

Usage

sq.test.lvsl_1(y, x, v.tau, n.size = 1, vec.date)

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 of interest.

n.size

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

vec.date

A numeric vector of break dates estimated under the null hypothesis.

Details

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.

Value

A numeric value representing the test statistic.

References

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.

Examples

## 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)



QR.break documentation built on June 8, 2025, 1:53 p.m.