A subroutine for model()
This function is a subroutine for model(), estimation procedure.
r_est(y, r, trim, tt, qq1, qn1, qn, n, cf, xt, ct, thresh)
y
: vector of dependent variable.r
: numer of regime.trim
: value of trimmed percentage.tt
: length of time period.qq1
: parameter defined by as.matrix(unique(thresh)[floor(sq*nrow(as.matrix(sort(unique(thresh)))))]).qn1
: as defined by nrow(qq1).qn
: number of quantiles to examine.n
: parameter of cross-section units.cf
: special declaration, e.g. lag().xt
: regime independent variables.ct
: trace of regime dependent variables.thresh
: threshold variable.Hanse B. E. (1999) Threshold effects in non-dynamic panels: Estimation, testing and inference. Journal of Econometrics,93, 345-368.
Original code from Dr. Hansen (http://www.ssc.wisc.edu/~bhansen/).
Useful links