王群勇xthreg命令.docx

上传人:wj 文档编号:1307890 上传时间:2023-04-30 格式:DOCX 页数:4 大小:215.66KB
下载 相关 举报
王群勇xthreg命令.docx_第1页
第1页 / 共4页
王群勇xthreg命令.docx_第2页
第2页 / 共4页
王群勇xthreg命令.docx_第3页
第3页 / 共4页
王群勇xthreg命令.docx_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

王群勇xthreg命令.docx

《王群勇xthreg命令.docx》由会员分享,可在线阅读,更多相关《王群勇xthreg命令.docx(4页珍藏版)》请在冰点文库上搜索。

王群勇xthreg命令.docx

王群勇xthreg命令

Fixed-effectpanelthresholdmodelusingStata

helpxthreg(SJ15-1:

st0373)需要stata13及以上版本,2015年第一期

----------------------------------------------------------------------------------------------------------------------

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("LRStatistics")xtitle("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%的置信水平。

第四部分是固定效应回归结果。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 求职职场 > 简历

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2