Main Procedure for Restricted Structural Change Analysis
Description
Function for restricted structural change models that performs estimation, hypothesis testing, and critical value simulation.
Usage
mainp(m, q, z, y, trm, robust, prewhit, hetvar, S, s, R, r, doestim, dotest, docv, Tstar, rep, bigt, forma, formb, Verbose)mainp(m, q, z, y, trm, robust, prewhit, hetvar, S, s, R, r, doestim, dotest, docv, Tstar, rep, bigt, forma, formb, Verbose)
Arguments
m |
An integer of number of breaks. |
q |
An integer of number of regressors. |
z |
A numeric matrix ( |
y |
A numeric vector ( |
trm |
A numeric value of trimming parameter. |
robust |
An integer (0 or 1). If 1, use HAC standard errors. |
prewhit |
An integer (0 or 1). If 1, apply AR(1) prewhitening (only when robust=1). |
hetvar |
An integer (0 or 1). If 1, allow heteroskedastic variance across segments. |
S |
Numeric matrix defining the linear reparameterization for Form A:
|
s |
Numeric vector of constants in |
R |
Numeric matrix defining linear restrictions for Form B,
|
r |
Numeric vector of restriction constants in
|
doestim |
An integer (0 or 1). If 1, perform estimation. |
dotest |
An integer (0 or 1). If 1, perform sup-F test. |
docv |
An integer (0 or 1). If 1, simulate critical values. |
Tstar |
An integer of sample size for critical value simulation (default: 500). |
rep |
An integer of number of Monte Carlo replications (default: 2000). |
bigt |
An integer of sample size (if NULL, derived from length of y). |
forma |
An integer (0 or 1). If 1, use Form A restrictions. |
formb |
An integer (0 or 1). If 1, use Form B restrictions. |
Verbose |
Logical. If |
Details
The function supports two forms of linear restrictions on the break-model coefficient
vector :
-
Form A:
, an affine parameterization with basis matrixand shift. Useforma = 1. -
Form B:
, explicit linear constraints. Useformb = 1.
Both forms can be used simultaneously (forma = 1 and formb = 1),
in which case both sets of results are computed and the last one overwrites
shared list entries (estimation, test_statistic, critical_values).
If both forms are used simultaneously, consider storing results separately.
For testing and critical value simulation, the implied no-break null restrictions
on the common coefficient vector are derived automatically via
build_null_from_S() (Form A) or build_null_from_R() (Form B).
Value
A list (returned invisibly) with some or all of the following components,
depending on the values of doestim, dotest, docv,
forma, and formb:
-
estimation: Output from the estimation procedure. Produced whendoestim = 1. Ifforma = 1, this is the output ofestco(); ifformb = 1, this is the output ofestco2(). A list containing:-
breaks: An integer vector of lengthgiving the estimated break dates. -
coefficients: A numeric vector of lengthgiving the regime-specific coefficient estimates. -
vcov: Avariance-covariance matrix ofcoefficients. -
ci_breaks: Anmatrix of confidence intervals for the break dates. The first two columns give the 95\ (lower bound, upper bound) and the last two columns give the 90\ (lower bound, upper bound).
-
-
test_statistic: The value of the restricted structural change sup-F test statistic. A scalar. Produced whendotest = 1. Ifforma = 1, this is the output ofpftest(); ifformb = 1, this is the output ofpftest2(). The null hypothesis is no structural break subject to the implied null restrictions derived fromS, s(Form A) orR, r(Form B) viabuild_null_from_S()orbuild_null_from_R(). -
critical_values: A numeric vector of length 4 containing simulated critical values of the sup-F test at the 90\ in that order. Produced whendocv = 1. Ifforma = 1, simulated byrcv(); ifformb = 1, simulated byrcv2(). Obtained by Monte Carlo simulation withrepreplications and sample sizeTstar, under the null of no break with the implied null restrictions.
References
Perron, P., and Qu, Z. (2006). Estimating restricted structural change models. Journal of Econometrics, 134(2), 373-399.
Examples
data(example) y <- example$y z <- matrix(1, length(y), 1) m <- 3 q <- 1 trm <- 0.10 R <- matrix(c(1, 0, -1, 0, 0, 1, 0, -1), nrow = 2, byrow = TRUE) r <- c(0, 0) out <- mainp(m = m, q = q, z = z, y = y, trm = trm, robust = 0, prewhit = 0, hetvar = 1, R = R, r = r, doestim = 1, dotest = 0, docv = 0, bigt = length(y), forma = 0, formb = 1, Verbose = FALSE) out$estimation$breaksdata(example) y <- example$y z <- matrix(1, length(y), 1) m <- 3 q <- 1 trm <- 0.10 R <- matrix(c(1, 0, -1, 0, 0, 1, 0, -1), nrow = 2, byrow = TRUE) r <- c(0, 0) out <- mainp(m = m, q = q, z = z, y = y, trm = trm, robust = 0, prewhit = 0, hetvar = 1, R = R, r = r, doestim = 1, dotest = 0, docv = 0, bigt = length(y), forma = 0, formb = 1, Verbose = FALSE) out$estimation$breaks