表2-1:回归分析相关命令一览命令用途anova方差和协方差分析heckmanHeckman筛选模型intreg离散型变量模型,包括Tobit、cnreg和intregivreg工具变量法(IV或2SLS)neweyNewey-West标准差设定下的回归prais针对序列相关的Prais-Winsten,Cochrane-Orcutt,orHildreth-Lu回归qreg分量回归regOLS回归sw逐步回归法reg3三阶段最小二乘回归rreg稳健回归(不同于方差稳健型回归,即White方法)sureg似无相关估计svyheckman调查数据的Heckman筛选模型svyintreg调查数据的间断变量回归svyregress调查数据的线性回归tobitTobit回归treatregtreatment效应模型truncreg截断回归表2-2:时间序列命令一览命令用途clemao1允许结构突变的单位根检验zandrewsdfullerdfglspperroncoin单方程协整检验dwstat参考dwstat2,durbina2durbinh表2-3:PanelData模型相关命令一览I命令模型统计描述相关命令:xtdes变量类型,数据类型描述xtsum基本统计量xttab按表格形式列示xtpattern面板数据的模式估计相关命令:xtreg面板数据模型(固定效应、随机效应)xtregar含有AR(1)干扰项的固定效应和随机效应面板数据模型xtgls截面-时序混合模型,可处理异方差、组内序列相关和组间相关性xtpcseOLSorPrais-Winstenmodelswithpanel-correctedstandarderrorsxtrchhHildreth-Houckrandomcoefficientsmodelsxtivreg面板模型的工具变量或两阶段最小二乘法估计xtabondArellano-Bond(1991)线性动态面板数据模型估计xtabond2Arellano-Bover(1995)系统GMM动态面板数据模型估计xttobitTobit随机效应面板模型xtintregRandom-effectsintervaldataregressionmodelsxtlogitFe,Re,PalogitmodelsxtprobitRe,PaprobitmodelsxtcloglogRe,PacloglogmodelsxtpoissonFe,Re,PaPoissonmodelsxtnbregFe,Re,Panegativebinomialmodelsxtfrontier面板随机前沿模型xthtylorHausman-Taylorestimatorforerror-componentsmodels表2-4:PanelData模型相关命令一览II命令模型假设检验相关:testWald检验,如时间效应联合显著性检验xttest0随机效应检验xttest1面板序列相关检验xttest2adsxtserialWooldridge一阶序列相关检验xtabArellano面板一阶序列相关检验hausmanHausman检验面板单位根和协整相关:xtunitstata提供的检验方法ipshinIPS(2003)面板单位根检验levilinLevin,Lin和Chu(LLC,2002)面板单位根检验madfullerSarno-Taylor(1998)面板单位根检验xtfisherMaddala和Wu(1999),基于P值的面板单位根检验表2-5:Post-estimationCommands命令名称用途adjust列示预测结果的均质,适于多种回归分析,可分组列示estimates估计结果的存储、再显示、列表比较等hausmanHausman模型识别检验lincom获得参数的线性组合,在Logit模型中可以获得系数线性组合的OR值linktest但方程link识别检验,用y对Oy和Oy2回归lrtest似然比(LR)检验mfx计算边际效应和弹性系数nlcom系数的非线性组合predict获得拟合值、残差等predictnl获得非线性估计的拟合值、残差等test线性约束的假设检验,Wald检验testnl非线性约束的假设检验vce列示参数估计值的方差-协方差矩阵表2-6:二维图种类一览图形种类简单描述scatterscatterplotlinelineplotconnectedconnected-lineplotscatteriscatterwithimmediateargumentsarealineplotwithshadingbarbarplotspikespikeplotdroplinedroplineplotdotdotplotrarearangeplotwithareashadingrbarrangeplotwithbarsrspikerangeplotwithspikesrcaprangeplotwithcappedspikesrcapsymrangeplotwithspikescappedwithsymbolsrscatterrangeplotwithmarkersrlinerangeplotwithlinesrconnectedrangeplotwithlinesandmarkerstslinetime-seriesplottsrlinetime-seriesrangeplotmbandmedian-bandlineplotmsplinesplinelineplotlowessLOWESSlineplotlfitlinearpredictionplotqfitquadraticpredictionplotfpfitfractionalpolynomialplotlfitcilinearpredictionplotwithCIsqfitciquadraticpredictionplotwithCIsfpfitcifractionalpolynomialplotwithCIsfunctionlineplotoffunctionhistogramhistogramplotkdensitykerneldensityplot表2-7:二维图选项一览选项类别简单描述addedlineoptionsdrawlinesatspecifiedyorxvaluesaddedtextoptiondisplaytextatspecified(y,x)valueaxisoptionslabels,ticks,grids,logscalestitleoptionstitles,subtitles,notes,captionslegendoptionlegendexplainingwhatmeanswhatscale(#)resizetext,markers,andlinewidthsregionoptionsoutlining,shading,aspectratio,sizeaspectoptionconstrainaspectratioofplotregionscheme(schemename)overalllookby(varlist,...)repeatforsubgroupsnodrawsuppressdisplayofgraphname(name,...)specifynameforgraphsaving(filename,...)savegraphinfileadvancedoptionsdifficulttoexplain表2-9:模拟分析相关命令一览命令用途备注抽样相关:corr2data产生具有指定相关性的数据仅适用于模拟相关分析drawnorminvnorm(uniform())产生服从标准正态分布的随机数函数,可调节均值和方差matuniform(r,c)产生均匀分布函数sample从现有数据中进行非重复随机抽样参考bsamplesimarma产生服从ARIMA过程的随机变量需要下载Bootstrap相关:bootstrapbsbstatbsampleMC相关:simulateMCsimulationjknife类似于MCpermutepostfile存储MC的结果statsbyexplist