EstimationwithSTATA()arlion@stu.xjtu.edu.cn2005.1028.1.............................................28.2.....................................38.2.1...................................48.2.2...................................78.2.3......................................118.2.4STATA....................................138.3.........................................218.3.1.......................................218.3.2......................................258.3.3..........................308.3.4STATA....................................308.4..........................................3218.1PanelVARPanelUnitRoottestPanelCointegerationPanelThreshold30121228.2.38.2AR(1),AR(2),MA(1)—yitDx0itCuit(8.1)uitDaiCit(8.2)iD1;2;;N;tD1;2;;TxitK1KK1iai(individualeffects)2828100006008.2.48.2.38.2.1ai(8.1)yiDai1TCxiCi(8.3),yiD.yi1;yi2;;yiT/0,xiD.xi1;xi2;;xiT/0,iD.i1;i2;;iT/0,1T1T131:E[ijxi;ai]D0(8.4)2:Var[ijxi;ai]D2IT(8.5)1x2(8.1)OLSBLUE12(8.1)OLSBLUEN(N+K)4NN=10000310:E[ijxi]D020:Var[ijxi]D2IT4(8.1)NXOLSXN-168.2.5(8.1)yDDaCXC(8.6)yD.y01;y02;;y0N/0,D.1;2;;N/0,NT1,DDIN1T,aD.a1;a2;;aN/0DN(8.6)OLSyDXCNDD0DINJT,JTD1T10TTT1PDD.D0D/ 1D0DINNJT,NJTD.1=T/JTTT1=T;QDINT D.D0D/ 1D0DINT PPQ(1):P0DP,P2DP;(2):PQD0;(3):PCQDINT.QDD0(8.6)QQyDQXCQ(8.7)OLS5OWGD.X0QX/ 1X0Qy(8.8)Var.OWG/D2.X0QX/ 1(8.9)2O2D1NT N K.Qy QXOWG/0.Qy QXOWG/(8.10)5(8.7)OLSE[.Q/.Q/0]D2Q6D2IGLS(8.8)8.2.6OaiDNyi NxiOWG(8.11)(8.8).yit Nyi/D.x0it Nxi/C.it Ni/(8.12),NyiD.1=T/PTtD1yit,NxiNiOWGOLS(8.6)DaNX6(8.1)4yi2D4xi2C4i2:::4yiTD4xiTC4iT(8.13)ByiDBxiCBi(8.14)BD26666664 110000 1100::::::::::::000 1137777775.T 1/T(8.15).INB/yD.INB/XC.INB/(8.16)QBDINBOLSOOLSD.X0QBX/ 1X0QBy(8.17)6XPNiD1aiD0OaiiSTATA8.0X8.2.71E[X]D0OOLSONOOLS2BVar.QB/D2QBQ0B(8.18)(8.16)GLSBLUEOGLSD[XQB.QBQ0B/ 1QBX] 1XQB.QBQ0B/ 1QBy:(8.19)QB.QBQ0B/ 1QBDQ7OGLSOWGGLSGLSOGLSOLSOWGBLUE8.2.2GLSN(8.1):yitDxitCuit(8.20)uitDaiCit(8.21)127.AF/.CD/D.AC/.FD/,QB.QBQ0B/ 1QBDINB0.BB0/ 1BB0.BB0/ 1BDIT NJTHD24T 1=210T.BB0/ 1=2B35HH0DIT,H0HDIT,10T1T=TCB0.BB0/ 1BDITQB.QBQ0B/ 1QBDIN.IT NJT/DINT PDQ.8.2.83:aiIID.0;2a/(8.22)4:Cov.ai;xit/D0(8.23)5:uijxiIID.0;2ITC2a1T10T/(8.24)102aE[ai]2ai3aiit-DE[uu0]DIN.2ITC2a1T10T/DIN666(8.25)666D2ITC2a1T10T666D266666642aC22a2a2a2aC22a::::::::::::2a2a2aC237777775:(8.26)GLSOGLSD[X0 1X] 1X0 1y(8.27)Var.OGLS/D[X0 1X] 1(8.28)OLS 1=2D[In666] 1=2666 1=2666 1=2D1I T1T10TD1 p2CT2a8.2.9666 1=2yiD126666664yi1 Nyiyi2 Nyi:::yiT Nyi37777775(8.29)xiOLS(8.27)(8.29)D1OGLSGreene(2002,pp.295-296)FGLSGLS,22a(8.51)GLS2O2OLSO2O2u2eitD.yit Nyi/ .xit Nxi/0OWGO2DPniD1PTtD1e2itnT n K(8.30)2a(8.20)OLSQeit(8.20)OLSO2uDPniD1PTtD1Qe2itnT K 1DO2CO2a(8.31)O2aDO2u O2(8.30)(8.31)O2uO222a8.2.10OLS22aOLSNyiDNx0iCNi(8.32)mDO2aC.O2=T/mO2uO2DTT 1.O2u m/O2aDTT 1m 1T 1O2uFGLSGLSBLUEFGLSN!1T!1MaddalaMount(1973)FGLSTaylor(1980)FGLSLSDV(1)LSDVFGLS(2)FGLSCramer-Rao17%(3)FGLSCov.uit;ujs/D8:2aC2foriDj;tDs2aforiDj;t6Ds(8.33)DCorr.uit;ujs/D8:1foriDj;tDs2a=.2aC2/foriDj;t6Ds(8.34)0(8.34)D2a=.2aC2/8.3.28.2.118.2.3(8.2.1)OLSPooledOLSH0:1D2DDnFFD.R2u R2r/=.n 1/.1 R2u/=.nT n K/F.n 1;nT n K/(8.35)urFBreuschPagan1980OLSLMH0:2aD0v:s:H1:2a6D0LMDnT2.T 1/264PniD1hPTtD1eiti2PniD1PTtD1e2it 13752(8.36)LM1LMLMDnT2.T 1/e0DD0ee0e 12(8.37),ai8.2.12HausmanMundlak1978aiHausmanaiOLSGLSbOOLSGLSVar[b O]DVar[b]CVar[O] Cov[b O] Cov[b O]0(8.38)HausmanCov[.b O/;O]DCov[b;O] Var[O]D0(8.39)Cov[b;O]DVar[O](8.40)(8.40)(8.38)Var[b O]DVar[b] Var[O]D999(8.41)HausmanWaldWD[b O]0O999 1[b O]2.K 1/(8.42),O999.aixit88B-PHausman8.2.13yitDaiCxitCit(8.43)4yitD4xitC4it(8.44)itDit 1Cuit,4itD4it 1C4uitH0:D0v:s:6D04itDeitH0Corr.eit;eit 1/D 0:5(8.45)(8.44)OLSOeitOeit 1OLSOO-0.5t9Baltagi(2001)10seexttest2andxttest38.2.4STATAPanelDatacompanyyearinvestmvalue11951755.94833.011952891.24924.9119531304.46241.7119541486.75593.621951588.22289.521952645.52159.421953641.02031.321954459.32115.59Wooldridge(2002,pp.282)STATAxtserial10STATAxttest18.2.1431951135.21819.431952157.32079.731953179.52371.631954189.62759.9............companyyearpaneldataSTATAtsset11tssetcompanyyearpanelvariable:company,1to5timevariable:time,1to20PanelDataPanelDataLaginvestinvestgenLag_invest=L.investcompanyyearinvestLag_investmvalue11951755.9.4833.011952891.2755.94924.9119531304.4891.26241.7119541486.71304.45593.621951588.2.2289.521952645.5588.22159.421953641.0645.52031.321954459.3641.02115.531951135.2.1819.431952157.3135.22079.731953179.5157.32371.631954189.6179.52759.9...............11Seehelptsset,whelptssetPanelData[whelpxt]8.2.15PanelDataPanelDataPanelData12xtdes8-1:xtdesPanelDataxtsumxttabxtsumsummarypooleddatalistsumdestabstathistogramkdensityPaneldataSTATA8.08-2xtreg12xtcountxtlistcountbyxtpatternxtcorrxtcorr28.2.168-2:STATA8.0PanelDataxtregFixed-,between-andrandom-effects,andpopulation-averagedlinearmodelsxtregarFixed-andr