您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > Stata-动态面板-GMM(xtabond2)--操作英文案例
UsingArellano–BondDynamicPanelGMMEstimatorsinStataTutorialwithExamplesusingStata9.0(xtabondandxtabond2)ElitzaMileva,EconomicsDepartmentFordhamUniversityJuly9,20071.ThemodelThefollowingmodelexaminestheimpactofcapitalflowsoninvestmentinapaneldatasetof22countriesfor10years(1995–2004):Iit=β1Ii,t−1+β2Kit+β3Xit+uit.(1)Inequation(1)aboveIitisgrossfixedcapitalformationasapercentageofGDPandIit-1isitslaggedvalue.Kitisamatrixofthecomponentsofforeignresourceflows–FDI,loansandportfolio(equityandbonds)–aspercentagesharesofGDP.Xitisamatrixofthefollowingcontrolvariables:laggedrealGDPgrowthtoaccountfortheacceleratoreffect;theabsolutevalueofonestepaheadgrowthforecasterrorsasameasureofuncertainty;thechangeinthelogtermsoftradetogaugethepriceofimportedcapitalgoods;and,finally,thedeviationofM2fromitsthree-yeartrendasaproxyfortheliquidityavailabletofinanceinvestment.2.WhytheArellano–BondGMMestimator?Severaleconometricproblemsmayarisefromestimatingequation(1):1.ThecapitalflowsvariablesinKitareassumedtobeendogenous.Becausecausalitymayruninbothdirections–fromcapitalinflowstoinvestmentandviceversa–theseregressorsmaybecorrelatedwiththeerrorterm.2.Time-invariantcountrycharacteristics(fixedeffects),suchasgeographyanddemographics,maybecorrelatedwiththeexplanatoryvariables.Thefixedeffectsarecontainedintheerrorterminequation(1),whichconsistsoftheunobservedcountry-specificeffects,vi,andtheobservation-specificerrors,eit:1uit=vi+eit(2).3.ThepresenceofthelaggeddependentvariableIit-1givesrisetoautocorrelation.4.Thepaneldatasethasashorttimedimension(T=10)andalargercountrydimension(N=22).Tosolveproblem1(andproblem2)onewouldusuallyusefixed-effectsinstrumentalvariablesestimation(two-stageleastsquaresor2SLS),whichiswhatItriedfirst.TheexogenousinstrumentsIusedwerethefollowing:theaggregatelong-termcapitalinflowstothecountriesinoursampleasagroupasapercentageofthesumoftheircumulativeGDP(Ilabelledthese‘regionalflows’),anindexoffinancialopennessandtheEBRDtransitionindex.However,thefirst-stagestatisticsofthe2SLSregressionsshowedthatmyinstrumentswereweak.Withweakinstrumentsthefixed-effectsIVestimatorsarelikelytobebiasedinthewayoftheOLSestimators.Therefore,IdecidedtousetheArellano–Bond(1991)differenceGMMestimatorfirstproposedbyHoltz-Eakin,NeweyandRosen(1988).InsteadofusingonlytheexogenousinstrumentslistedabovelaggedlevelsoftheendogenousregressorsinKit(FDI,loansandportfolio)arealsoadded.Thismakestheendogenousvariablespre-determinedand,therefore,notcorrelatedwiththeerrorterminequation(1).Tocopewithproblem2(fixedeffects)thedifferenceGMMusesfirst-differencestotransformequation(1)intoΔIit=β1ΔIi,t−1+β2ΔKit+β3ΔXit+Δuit(3).(Ingeneralformthetransformationisgivenby:Δyit=αΔyit−1+Δ′xitβ+Δuit.)Bytransformingtheregressorsbyfirstdifferencingthefixedcountry-specificeffectisremoved,becauseitdoesnotvarywithtime.Fromequation(2)wegetΔuit=Δvi+Δeitoruit−ui,t−1=(vi−vi)+(eit−ei,t−1)=eit−ei,t−1.Thefirst-differencedlaggeddependentvariable(problem3)isalsoinstrumentedwithitspastlevels.2Finally,theArellano–Bondestimatorwasdesignedforsmall-Tlarge-Npanels(problem4).Inlarge-Tpanelsashocktothecountry’sfixedeffect,whichshowsintheerrorterm,willdeclinewithtime.Similarly,thecorrelationofthelaggeddependentvariablewiththeerrortermwillbeinsignificant(seeRoodman,2006).Inthesecases,onedoesnotnecessarilyhavetousetheArellano–Bondestimator.3.UsingtheArellano–BonddifferenceGMMestimatorinStata3.1ImportdataintoStataTheeasiestwaytogetpaneldataintoStataistoorganizeyourExcelspreadsheetinthefollowingway:ctryctry_dumyearinvgrowthuncerttotdev_m2fin_integrtrans_indexfdiloansportfolioflows_eecaALB1199518.0008.9008.4440.215.3.0002.3330.861-0.0050.0001.121ALB1199621.0449.1006.614-0.112.3.0002.5190.9940.0500.0001.198ALB1199716.829-10.20012.2470.0579.4473.0002.5190.580-0.0130.0001.783ALB1199816.29612.70016.8740.0193.2813.0242.5190.480-0.0190.0002.365ALB1199920.00510.1006.7830.0711.4443.0242.5570.389-0.0350.0001.826ALB1200024.7367.3003.750-0.0062.5723.0242.7781.245-0.0090.0001.488ALB1200129.2157.2004.023-0.0182.6543.0242.8141.648-0.0310.0001.263ALB1200226.1563.4000.045-0.0102.9373.0242.8141.0020.0050.0001.718ALB1200325.0136.0023.7160.011-0.4553.0242.8141.225-0.0190.0001.894ALB1200423.6865.9002.5430.040-1.2983.0242.8892.7010.1880.0003.288ARM2199516.1546.90017.601-0.103-10.8082.0002.1120.3940.0000.0001.121ARM2199617.8855.8657.8720.3020.2613.0002.4440.3090.0000.0331.198…Notethatallobservations(i.e.country1period1;country1period2;etc.)arestackedverticallyandthevariablearelistedhorizontally.SavetheExcelworksheetasatextfile(.txt,.csv,etc.).OpenStataandimportthedatabychoosingFile,Import,ASCIIdatacreatedbyspreadsheet,andclickontheBrowsebutton.Alternatively,youcantypethefollowingcommandinthecommandwindow,ifyourtextfileislocatedontheCdrive:insheetusingC:\ABExampleData.txt(14vars,220obs)(NotethatfromnowontextinbluewillshowStatacommandsortheircomponents.)3.2SetthedatasetasapanelNext,saveyourdatasetasapanelbyselectingStatistics,Longitudinal/Paneldata,Setup&Utilities,Declaredatasettobecross-sectionaltimeseries.Chooseavariablethatid
本文标题:Stata-动态面板-GMM(xtabond2)--操作英文案例
链接地址:https://www.777doc.com/doc-5074462 .html