Learn R Programming

QR.break (version 1.0.1)

ci.date.m: Confidence Intervals for Break Dates

Description

This function constructs confidence intervals for break dates based on a single quantile or multiple quantiles (specified by the user).

Usage

ci.date.m(y, x, vec.tau, vec.date, n.size = 1, v.b = 2)

Value

A numeric matrix where:

  • The 1st column contains the break dates.

  • The 2nd and 3rd columns contain the lower and upper bounds of the confidence intervals, respectively.

Arguments

y

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

x

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

vec.tau

A numeric vector of quantiles of interest.

vec.date

A numeric vector of estimated break dates.

n.size

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

v.b

A numeric value specifying the confidence level:

  • v.b = 1 for the 90% confidence interval.

  • v.b = 2 for the 95% confidence interval.

References

Oka, T. and Z. Qu (2011). Estimating Structural Changes in Regression Quantiles. Journal of Econometrics, 162(2), 248–267.

Examples

Run this code

# data 
data(gdp)
y = gdp$gdp
x = gdp[,c("lag1", "lag2")] 

# quantiles 
vec.tau  = 0.8

# break dates (point estimates)
vec.date = c(146, 200)

# Calculate confidence intervals for break dates
res = ci.date.m(y, x, vec.tau, vec.date, n.size = 1, v.b = 2)
print(res)

Run the code above in your browser using DataLab