xtthres is for use with panel data. You must tsset your data before using xtthres; see help tsset xt.
xtthres shares the features of all estimation commands; see help estcom.
Description
xtthres fits static panel threshold model with fixed effects, which is first developed by B.E.,Hansen (1999).
After estimating the model using xtthres, you can use xttr_graph to draw graphs for each model so as to see the construction of confidence intervials
of r_hat.
Options
thres(varname) specifies threshold variable, as denoted by q_it in Hansen(1999). Note that this option should not be omitted.
dthres(varname) specifies the variable that will show threshold effects, as denoted by x_it in Hansen(1999). This variable will be multipled by the
indicator function I(.). Note that this option should not be omitted either.
qn(#) specifies the number of distinct values to be search in finding out the optimal estimate of threshold effects, r_hat, which will minimize the
sum of square residuals of the model. The default value is 400.
bs1(#), bs2(#), bs3(#) specify the Bootstrap times in single threshold, double threshold and triple threshold model respectively. The default values
are all 300.
level(#) specifies the confidence level, in percent, for confidence intervals. The default is level(95) or as set by set level; see help level.
minobs specifies the minimum number of observations in each of the regimes when searching for r_hats. The default is 10.
where depvar is the dependent variable and indepvars are the regime-independent variables.
Description
xthreg fits fixed-effect panel threshold models based on the method proposed by Hansen (1999). xthreg uses [XT] xtreg to fit the fixed-effect panel
threshold model given the threshold estimator. The fixed-effect panel threshold model requires balanced panel data, which is checked automatically
by xthreg. The estimation and test of the threshold effect are computed in Mata.
Options
rx(varlist) is the regime-dependent variable. Time-series operators are allowed. rx() is required.
qx(varname) is the threshold variable. Time-series operators are allowed. qx() is required.
thnum(#) is the number of thresholds. In the current version (Stata 13), # must be equal to or less than 3. The default is thnum(1).
grid(#) is the number of grid points. grid() is used to avoid consuming too much time when computing large samples. The default is grid(300).
trim(numlist) is the trimming proportion to estimate each threshold. The number of trimming proportions must be equal to the number of thresholds
specified in thnum(). The default is trim(0.01) for all thresholds. For example, to fit a triple-threshold model, you may set trim(0.01 0.01
0.05).
bs(numlist) is the number of bootstrap replications. If bs() is not set, xthreg does not use bootstrap for the threshold-effect test.
thlevel(#) specifies the confidence level, as a percentage, for confidence intervals of the threshold. The default is thlevel(95).
gen(newvarname) generates a new categorical variable with 0, 1, 2, ... for each regime. The default is gen(_cat).
noreg suppresses the display of the regression result.
nobslog suppresses the iteration process of the bootstrap.
thgiven fits the model based on previous results.
options are any options available for [XT] xtreg.
Time-series operators are allowed in depvar, indepvars, rx(), and qx().
Examples
Setup
. use hansen1999
Estimate a single-threshold model
. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(1) trim(0.01) grid(400) bs(300)
Estimate a triple-threshold model given the estimated result above
. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) bs(0 300 300) thgiven
. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) grid(400) bs(300 300 300)
Estimate a triple-threshold model directly
. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) bs(300 300 300)