您好,欢迎访问三七文档
当前位置:首页 > 建筑/环境 > 工程监理 > 倍差法STATA命令
MPRAMunichPersonalRePEcArchiveSimplifyingtheestimationofdierenceindierencestreatmenteectswithStataJuanM.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
本文标题:倍差法STATA命令
链接地址:https://www.777doc.com/doc-5901405 .html