Learn R Programming

QR.break (version 1.0.1)

dq.test.0vs1: Test for the Presence of a Break within a Range of Quantiles

Description

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.

Usage

dq.test.0vs1(y, x, q.L, q.R, n.size = 1)

Value

A numeric scalar representing the DQ test statistic.

Arguments

y

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

x

A numeric matrix of regressors (\(NT \times p\)), excluding the constant term.

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 (\(N\)).

References

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.

Examples

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

Run the code above in your browser using DataLab