倍差法STATA命令

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

MPRAMunichPersonalRePEcArchiveSimplifyingtheestimationofdi erenceindi erencestreatmente ectswithStataJuanM.VillaBrooksWorldPovertyInstitute,UniversityofManchesterNovember2012Onlineat:59UTCSimplifyingtheEstimationofDifferenceinDifferencesTreatmentEffectswithStata*JuanM.VillaBrooksWorldPovertyInstituteUniversityofManchesterManchester,UK.juan.villalora@postgrad.manchester.ac.uk***DRAFTVERSION***Abstract.ThispaperexplainstheinsightsoftheStata'suserwrittencommanddifffortheestimationofDifferenceinDifferencestreatmenteffects(DID).TheoptionsandtheformulasaredetailedforthesingleDID,KernelPropensityScoreDID,QuantileDIDandthebalancingproperties.AnexampleofthefeaturesofdiffispresentedbyusingthedatasetfromCardandKrueger(1994).Keywords:Differenceindifferences,causalinference,kernelpropensityscore,quantiletreatmenteffects,quasi-experiments.1.IntroductionDifferenceinDifferencestreatmenteffects(DID)havebeenwidelyusedwhentheevaluationofagiveninterventionentailsthecollectionofpaneldataorrepeatedcrosssections.DIDintegratestheadvancesofthefixedeffectsestimatorswiththecausalinferenceanalysiswhenunobservedeventsorcharacteristicsconfoundtheinterpretations(AngristandPischke,2008).Despitetheexistenceofotherplausiblemethodsbasedontheavailabilityofobservationaldataforquasi-experimentalcausalinference-i.e.matchingmethods,instrumentalvariable,regressiondiscontinuity-,DIDestimationsofferanalternativereachingtheunconfoundednessbycontrollingforunobservedcharacteristicsandcombiningitwithobservedorcomplementaryinformation.Additionally,theDIDisaflexibleformofcausalinferencebecauseitcanbecombinedwithsomeotherprocedures,suchastheKernel*Apreviousversionofthispaperwaspresentedatthe2012UKStataUsersGroupMeetinginLondon,UK.Thisversion:November,2012.PropensityScore(Heckmanetal.,1997,1998)andthequintileregression(Meyeretal.,1995).Inthispaper,theStata'scommanddiffisexplainedandsomedetailsonitsimplementationaregivenbyusingthedatasetsfromtheCardandKrueger(1994)articleontheeffectsoftheincreaseintheminimumwage.Similarly,itisexplainhowthebalancingpropertiescanbetestedwhenobservationaldataisprovided.InthenextsectiontheequationsbehindtheestimationoftheDIDareexplainedalongwiththefeaturesofthediffcommand.Inthethirdsectionandexampleisprovidedand,inthefourthsection,thebalancingpropertiesaretestedwiththeoptionsthatcanbespecifiedwiththecommand.2.diffsyntaxandequationsdiffcanbeinstalledorupdatedfromtheSSCarchivebyrunningthecommand:sscinstalldiff,replaceThediffsyntaxisdetailedasfollows:diffoutcome_var[if][in][weight],[options]Thecommandrequeststhespecificationoftheoutcomevariable(outcome_var)andallowstheuseofweights,exceptforsomeoptions.Theinitialrequiredoptionistheperiod(varname),whichcontainsadummyvariableindicatingthebaseline(period==0)andafollow-up(period==1)periods.Additionally,theoptiontreated(varname),isneed,containingadummyvariablewiththeindicatorofthecontrol(treated==0)andtreated(treated==1)individuals.Fortheindividual,thisinitialsettingperformsthefollowinglinearregression:Theestimatedcoefficientshavethefollowinginterpretation::Isthemeanoutcomeforthecontrolgrouponthebaseline.:Isthemeanoutcomeforthecontrolgroupinthefollow-up.:Isthesingledifferencebetweentreatedandcontrolgroupsonthebaseline.:Isthemeanoutcomeforthetreatedgrouponthebaseline.:Isthemeanoutcomeforthetreatedgroupinthefollow-up.:IstheDIDorimpact.Thediffcommandarrangesthesecoefficientsintheoutputtable.Thenumberofobservations,r-squared,standarderrors,t-statistic-orthez-statwhenstandarderrorsarebootstrapped-andthep-valuearealsoreported:NumberofobservationsintheDIFF-IN-DIFF:#BaselineFollow-upControl:##Treated:##R-square:0.0DIFFERENCEINDIFFERENCESESTIMATION------------------------------BASELINE--------------------FOLLOWUP------------------------------OutcomeVariable|Control|Treated|Diff(BL)|Control|Treated|Diff(FU)|DIFF-IN-DIFF------------------+---------+-----------+----------+----------+-----------------+----------+-------------outcome_variable|Std.Error|||||||t/z|||||||P|t/z||||||||---------------------------------------------------------------------------------------------------------*MeansandStandardErrorsareestimatedbylinearregression**Inference:***p0.01;**p0.05;*p0.12.1Optionscov(varlist)-Specifiesthepre-treatmentcovariatesofthemodel.Thesevariablesarealsoknownascontrolsorobservablecharacteristics.Ifwedenoteasthethcovariate,diffrunsthefollowingregressionwiththisoption:Thecoefficientsarenotreportedintheoutputtable.However,itispossibletorequestthemifoptionreportisspecified.kernel-PerformstheKernel-basedPropensityScoreDID.Atafirststage,thisoptionrunsaprobitmodel-orlogitifthisoptionisselected-ofthetreated(varname)onthecov(varlist).Itgeneratesthevariables_weightsthatcontainstheweightsderivedfromthekerneldensityfunctionand_pswhenthePropensityScoreisnotspecifiedinpscore(varname).Thisoptionrequirestheid(varname)ofeachindividual,henceitisnotcompatiblewithrepeatedcrosssection.ItalsoallowstheestimationoftheDIDonthecommonsupp

1 / 12
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功