您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 企业财务 > stata关于面板数据说明
EstimationwithSTATAArlionnotesseriesNo.8Chp8PanelDataPanel8.18.28.2.1FixedEffectModel8.2.2RandomEffectModel8.38.4PanelData8.5PanelData8.6PanelData8.7PanelVAR8.8Stata8.0PanelDataSTATA8.0PanelDatacompanyyearinvestmvalue11951755.94833.011952891.24924.9119531304.46241.7119541486.75593.621951588.22289.521952645.52159.421953641.02031.321954459.32115.531951135.21819.431952157.32079.731953179.52371.631954189.62759.9companyyearpaneldataSTATA8.01arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8tsset1tssetpanelvartimevarPanelDataPanelDataLag_investinvestgenLag_invest=L.investPanelDataPanelData8.8.1PanelDataPanelData21Seehelptsset,whelptssetPanelData[whelpxt]22291979-199820580arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8xtdesPanelDataxtsumxttabxtdes34xtsumsummaryxtsum[varlist][ifexp][,i(varname)][]STATAtsset[,i(varname)]pooleddatalistsumdestabstathistogramkdensityPaneldata8.8.2STATA8.0PanelThresholdPanelVARSTATA8.0334arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8[whelpcommand]commandSTATASTATA5xtabond2xtregxtregFixed-effectRandom-effectBetween-effectPopulation-averagextregdepvar[varlist][ifexp],model_type[level(#)]model_typemodel_typemodel_typeSTATAGLSlevel(#)95%99%level(99)STATA8.0grunfeld.dtacompanyyear45STATAhelpsearchsearchallSTATASTATApreferenceGeneralpreferencesInternetprefsarlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8investmvaluekstocktssetcompanyyearpanelvariable:company,1to10timevariable:year,1935to1954STATAxtdes10n=1020T=201935-1954T_i20xtsuminvestmvaluekstocksumsumsuminvestmvaluekstock5arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8sumxtsumxtregmvalueinvestkstock,fefeFixed-effects(within)regressionNumberofobs=200Groupvariable(i):companyNumberofgroups=10R-sq:within=0.4117Obspergroup:min=20between=0.8078avg=20.0overall=0.7388max=20F(2,188)=65.78corr(u_i,Xb)=0.6955ProbF=0.0000----------------------------------------------------------------------------------------------------------------------mvalue|Coef.Std.Err.tP|t|[95%Conf.Interval]-------------------+--------------------------------------------------------------------------------------------------invest|2.856166.30751479.290.0002.2495433.462789kstock|-.5078673.1403662-3.620.000-.7847625-.2309721_cons|804.980232.4317724.820.000741.0033868.9571-------------------+--------------------------------------------------------------------------------------------------sigma_u|905.81517sigma_e|268.73329rho|.91910377(fractionofvarianceduetou_i)----------------------------------------------------------------------------------------------------------------------Ftestthatallu_i=0:F(9,188)=113.76ProbF=0.00003567FP65.780.00008-11tP95%sigma_usigma_erhou_iFp8.26arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8xtregmvalueinvestkstock,rextglsmvalueinvestkstock,panels(he)STATA18.2OLSPooledOLS0:H12nααα===F222()/(1)(1,(1)/()uruRRnFFnRnTnK−−=−−−−∼)nTnK−−urAdoA4TheFtestforallu_i=0is:113.76TheP-valueis:0.0000Pooled7arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.828.2Mundlak1978u_iHausmanu_iOLSGLSOLSGLS6HausmanStep1Step2Step3HausmanHausmanAdoA5----Coefficients----|(b)(B)(b-B)sqrt(diag(V_b-V_B))|fereDifferenceS.E.-------------------+-----------------------------------------------------------------------------------------------------invest|2.8561663.113429-.2572636.kstock|-.5078673-.578422.0705548.--------------------------------------------------------------------------------------------------------------------------b=consistentunderHoandHa;obtainedfromxtregB=inconsistentunderHa,efficientunderHo;obtainedfromxtregTest:Ho:differenceincoefficientsnotsystematicchi2(2)=(b-B)'[(V_b-V_B)^(-1)](b-B)86Greene4thchp14pp576arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8=2366.62Probchi2=0.0000BreuschPagan1980OLSLM70:H20uσ=1:H20uσ≠u_iSTATAxtregmvalueinvestkstock,rexttest0BreuschandPaganLagrangianmultipliertestforrandomeffects:mvalue[company,t]=Xb+u[company]+e[company,t]Estimatedresults:|Varsd=sqrt(Var)-------------+---------------------------------------------mvalue|17278311314.47e|72217.58268.7333u|298685.7546.5214Test:Var(u)=0chi2(1)=772.32Probchi2=0.0000B-PHausmanGLSFGLSxtgls97Greene4thchp14pp572arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8Hausman10arlion@stu.xjtu.edu.cnEstimationwithSTATAArlionnotesseriesNo.8ASTATAchp8_panel.do//chp8_paneldata*-toreader-*:useD:\stata8\ado\Examples\XTFiles\grunfeld.dta,clear*--A1--*tssetcompanyyear/*declarePanel-variableandTime-variable*/genLag_invest=L.investordercompanyyearinvestLag_invest/**/*--A2--*xtdes/*TodescribethepatternofPanelData*/xtsum/*Tocalculatethedescribativestatistics*///xttabinvest*--A3--*xtregmvalueinvestkstock,fe/*toestimatefixed-effectmodel*/xtregmvalueinvestkstock,re/*toestimaterandom-effectmodel*/xtglsmvalueinvestkstock,panels(he)/*toestimatethemodelwithHeteroskedasticvariancewithGLS*/*--A4--**-Testfixedeffect-*//step1:estimatePooledmodelandstoreR2regmvalueinvestkstockereturnlist/*toreader:pleaseseether
本文标题:stata关于面板数据说明
链接地址:https://www.777doc.com/doc-3964714 .html