This function is a subroutine for model(), estimation procedure.
r_est(y, r, trim, tt, qq1, qn1, qn, n, cf, xt, ct, thresh)
vector of dependent variable.
numer of regime.
value of trimmed percentage.
length of time period.
parameter defined by as.matrix(unique(thresh)[floor(sq*nrow(as.matrix(sort(unique(thresh)))))]).
as defined by nrow(qq1).
number of quantiles to examine.
parameter of cross-section units.
special declaration, e.g. lag().
regime independent variables.
trace of regime dependent variables.
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/).