王群勇xthreg命令Word格式文档下载.docx
《王群勇xthreg命令Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《王群勇xthreg命令Word格式文档下载.docx(4页珍藏版)》请在冰豆网上搜索。
xthreg--Estimatefixed-effectpanelthresholdmodel
Syntax命令:
xthregdepvar[indepvars][if][in],rx(varlist)qx(varname)[thnum(#)grid(#)trim(numlist)bs(numlist)thlevel(#)gen(newvarname)noregnobslogthgivenoptions]
wheredepvaristhedependentvariableandindepvarsaretheregime-independentvariables.
Description
xthregfitsfixed-effectpanelthresholdmodelsbasedonthemethodproposedbyHansen(1999).xthreguses[XT]xtregtofitthefixed-effectpanelthresholdmodelgiventhethresholdestimator.Thefixed-effectpanelthresholdmodelrequiresbalancedpaneldata,whichischeckedautomaticallybyxthreg.TheestimationandtestofthethresholdeffectarecomputedinMata.
Options:
rx(varlist)istheregime-dependentvariable.Time-seriesoperatorsareallowed.rx()isrequired.
qx(varname)isthethresholdvariable.Time-seriesoperatorsareallowed.qx()isrequired.门限变量
thnum(#)isthenumberofthresholds.Inthecurrentversion(Stata13),#mustbeequaltoorlessthan3.Thedefaultisthnum
(1).门限个数
grid(#)isthenumberofgridpoints.grid()isusedtoavoidconsumingtoomuchtimewhencomputinglargesamples.Thedefaultisgrid(300).格点数
trim(numlist)isthetrimmingproportiontoestimateeachthreshold.Thenumberoftrimmingproportionsmustbeequaltothenumberofthresholdsspecifiedinthnum().Thedefaultistrim(0.01)forallthresholds.Forexample,tofitatriple-thresholdmodel,youmaysettrim(0.010.010.05).一个门限,设置一个数值(0.01);
两个门限设置两个(0.010.05);
三个门限,设置三个(0.010.010.05)。
bs(numlist)isthenumberofbootstrapreplications.Ifbs()isnotset,xthregdoesnotusebootstrapforthethreshold-effecttest.自举法次数
thlevel(#)specifiestheconfidencelevel,asapercentage,forconfidenceintervalsofthethreshold.Thedefaultisthlevel(95).
gen(newvarname)generatesanewcategoricalvariablewith0,1,2,...foreachregime.Thedefaultisgen(_cat).
noregsuppressesthedisplayoftheregressionresult.
nobslogsuppressestheiterationprocessofthebootstrap.
thgivenfitsthemodelbasedonpreviousresults.
optionsareanyoptionsavailablefor[XT]xtreg.
Time-seriesoperatorsareallowedindepvar,indepvars,rx(),andqx().
Examples
Setup
.usehansen1999
Estimateasingle-thresholdmodel
.xthregiq1q2q3d1qd1,rx(c1)qx(d1)thnum
(1)trim(0.01)grid(400)bs(300)
Estimateatriple-thresholdmodelgiventheestimatedresultabove
.xthregiq1q2q3d1qd1,rx(c1)qx(d1)thnum(3)trim(0.010.010.05)bs(0300300)thgiven
.xthregiq1q2q3d1qd1,rx(c1)qx(d1)thnum(3)trim(0.010.010.05)grid(400)bs(300300300)
Estimateatriple-thresholdmodeldirectly
.xthregiq1q2q3d1qd1,rx(c1)qx(d1)thnum(3)trim(0.010.010.05)bs(300300300)
绘图:
Plottheconfidenceintervalusinglikelihood-ratio(LR)statistics
._matplote(LR21),columns(12)yline(7.35,lpattern(dash))connect(direct)msize(small)mlabp(0)mlabs(zero)ytitle("
LRStatistics"
)xtitle("
FirstThreshold"
)recast(line)name(LR21)nodraw
._matplote(LR22),columns(12)yline(7.35,lpattern(dash))connect(direct)msize(small)mlabp(0)mlabs(zero)ytitle("
SecondThreshold"
)recast(line)name(LR22)nodraw
.graphcombineLR21LR22,cols
(1)
Author
QunyongWang
InstituteofStatisticsandEconometrics
NankaiUniversity
Tianjin,China
QunyongWang@
输出结果包括四个部分。
第一部分输出门限估计值和自举法的结果。
第二部分列表输出门限值及置信区间,Th-1代表单一门限估计值,Th-21和Th-22代表双门限回归的两个估计值,有时Th-21和Th-1相同。
第三部分列出了门限检验,包括RSS、MSE、F统计量及概率值,以及10%、5%、1%的置信水平。
第四部分是固定效应回归结果。