Example: confidence

Title stata.com didregress — Difference-in-differences ...

Difference-in-differences estimationDescriptionQuick startMenuSyntaxOptionsRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferencesAlso seeDescriptiondidregressestimates the average treatment effect on the treated (ATET) from observational data bydifference-in-differences (DID) or difference-in- Difference-in-differences (DDD). TheATETof a binaryor continuous treatment on a continuous outcome is estimated by fitting a linear model with time andgroup fixed effects. TheDIDandDDDestimation performed bydidregresscan be applied to datacomprising repeated cross-sections in which different groups of individuals are observed at each theATET from observational data byDIDorDDDfor panel data. TheATETof a binary or continuous treatment on a continuous outcome is estimated by fitting a linearmodel with time and panel fixed startDIDestimate of theATET oftreat1on outcomey1modeled using covariatesx1andx2, andgrpvar1andtvarfixed effects, with the treatment occurring at thegrpvar1andtvarlevelsdidregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar)As above, but compute wild cluster bootstrapp-values and confidence intervals withgrpvar1as theclustering variabledidregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar) ///wildbootstrapAggregate

tvar must be a binary variable indicating observations subject to treatment or a continuous variable ... display of omitted variables and base and empty cells, and ... that are bias-corrected cluster robust using the degrees-of-freedom adjustment proposed byBell and McCaffrey(2002) (hc2), and that use bootstrap sampling done at the group level ...

Tags:

  Variable, Bias, Omitted

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Title stata.com didregress — Difference-in-differences ...

1 Difference-in-differences estimationDescriptionQuick startMenuSyntaxOptionsRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferencesAlso seeDescriptiondidregressestimates the average treatment effect on the treated (ATET) from observational data bydifference-in-differences (DID) or difference-in- Difference-in-differences (DDD). TheATETof a binaryor continuous treatment on a continuous outcome is estimated by fitting a linear model with time andgroup fixed effects. TheDIDandDDDestimation performed bydidregresscan be applied to datacomprising repeated cross-sections in which different groups of individuals are observed at each theATET from observational data byDIDorDDDfor panel data. TheATETof a binary or continuous treatment on a continuous outcome is estimated by fitting a linearmodel with time and panel fixed startDIDestimate of theATET oftreat1on outcomey1modeled using covariatesx1andx2, andgrpvar1andtvarfixed effects, with the treatment occurring at thegrpvar1andtvarlevelsdidregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar)As above, but compute wild cluster bootstrapp-values and confidence intervals withgrpvar1as theclustering variabledidregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar) ///wildbootstrapAggregate data at thegrpvar1andtvarlevels to estimate theATET didregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar) ///aggregate(standard)As above, but use the Donald and Lang (2007) method to compute theATETand standard errorsdidregress (y1 x1 x2) (treat1), group(grpvar1) time(tvar)

2 ///aggregate(dlang)DDDestimate of theATET oftreat2on outcomey2modeled using covariatesx1andx2and fixedeffects defined by two-way interactions forgrpvar1,grpvar2, andtvar, with the treatmentoccurring at thegrpvar1,grpvar2, andtvarlevelsdidregress (y2 x1 x2) (treat2), group(grpvar1 grpvar2) time(tvar)DIDestimate ofATET oftreat3on outcomey3usingxtsetdata;y3modeled using covariatesx1andx2, and individual (panel) andtvarfixed effects, with the treatment occurring at thegrpvar1andtvarlevelsxtdidregress (y3 x1 x2) (treat3), group(grpvar1) time(tvar)12 didregress Difference-in-differences estimationMenudidregressStatistics>Treat ment effects>Continuous outcomes>Difference in differencesxtdidregressStatistics>Treatm ent effects>Continuous outcomes>Difference in differences (FE)Statistics>Longitudinal/panel data>Difference in differencesSyntaxDID with repeated cross-sectional datadidregress (ovar omvarlist) (tvar[, continuous])[if] [in] [weight],group(groupvars)[time(timevar)o ptions]DID with longitudinal dataxtdidregress (ovar omvarlist) (tvar[, continuous])[if] [in] [weight],group(groupvars)[time(timevar)]

3 Options]ovaris the outcome of the covariates in the outcome model and may contain factor variables; see[U] Factor be a binary variable indicating observations subject to treatment or a continuous variablemeasuring treatment categorical variables that indicate the group level at which the treatment occurs. Atleast one group variable must be specified. Iftimevaris specified, at most two group variablesmay be specified. Iftimevaris not specified, at most three group variables may be a time variable . It must be specified ifgroupvarhas only one Difference-in-differences estimation 3optionsDescriptionModel group(groupvars)specify group variables time(timevar)specify time variablenointeractexcludegroup()andtime( )interactionsnogteffectsdo not include group and time effects in the modelaggregate(aggmethod)aggregate to the levels defined by interactinggroupvarsandtimevarwildbootst rap[(wildopts)]compute confidence intervals andp-values with the wild bootstrapSE/Robustvce(vcetype)vcetypemay beclusterclustvar,robust,hc2, orbootstrapReportinglevel(#)set confidence level.

4 Default islevel(95)aequationsdisplay auxiliary-equation resultsdisplayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor- variable labelingcoeflegenddisplay legend instead of statistics group(groupvars)is required. time(timevar)is required when only one group is ,collect, andstatsbyare allowed; see[U] Prefix ,aweights, andpweights are allowed; see[U] not appear in the dialog [U] 20 Estimation and postestimation commandsfor more capabilities of estimation data and fit modeldlang[,dlopt]aggregate data and fit model using Donald and Lang methodwildoptsDescriptionerrorweight(edt ype)specify the error weight typeedtype; default iserrorweight(rademacher)reps(#)perform# wild bootstrap replications; default isreps(1000)rseed(#)set random-number seed to#blocksize(#)perform wild bootstrap in blocks of#replicationsOptions Model group(groupvars)specifies group variables.

5 It indicates the group level at which the treatment be, for example, states, counties, or the group levels forwhich group effects are included in the model used to performDIDestimation and for which groupinteractions are included in the model used to ()also defines thelevel clustering for the default cluster robust standard ()is didregress Difference-in-differences estimationYou may specify at most two group variables if you also specify a time variable in thetime()option or at most three group variables if no time variable is (timevar)specifies the time variable . You may specifytime()when one or two group variablesare specified in thegroup() ()is required when only one group variable is specifiedin thegroup() from being included in the model. By default,didregressandxtdidregressinclude group and time interactions for your specification ifthere is more than one group to not include group and time effects.

6 By default,didregressadds groupand time dummies to the regression specification. By default,xtdidregressadds time dummiesto the fixed-effects (aggmethod)fits the model by aggregating data at be eitherstandardordlang[,dlopt].standardsp ecifies that aggregation is performed using the standard aggregation method. In thiscase, a regression model is fit of the original outcome on covariates that vary within levels ofthegroupvarsandtimevarinteraction. The estimates of the group-time level effects from thisregression are used to construct a new dependent variable . These effects along with the remainingcovariates are then aggregated to the level of the of thegroupvarsandtimevarinteraction. Thefinal results are obtained by regressing the estimated group-time level effects on the remainingcovariates with this aggregated dataset and estimating group-level cluster robust standard [,dlopt]aggregates data using methods proposed by Donald and Lang (2007).

7 Dloptmaybe that standard errors be estimated using the standard ordinary least-squaresmethod, as suggested by Donald and Lang (2007). With this method, as with thestandardaggregation method, a single regression model is fit in the first step, so the coefficientestimates are constant across levels of that the aggregation method allow for varying coefficients on the , in this case, separate regression models of the original outcome on covariatesthat vary within levels ofgroupvarsandtimevarare fit for each level of thegroupvarsandtimevarinteraction. Thus, this method allows the coefficients on these variables to constant from each of these regressions forms the new dependent variable . The finalregression and standard error computations are equivalent to those used by [(wildopts)]computes confidence intervals andp-values with the wild wild bootstrap is constructed imposing the null hypothesis that theATETis 0; that is, itis a restricted wild bootstrap.

8 Confidence intervals are computed separately from bounds of the confidence interval are computed using a bisection optimization algorithmdescribed inMethods and (edtype),reps(#),rseed(#),andblocksize(# ).errorweight(edtype)defines the error weight used to draw residuals from the wild one ofrademacher(the default),mammen,webb,normal, the residuals at each bootstrap replication with a randomly generatedvariable that takes the value of 1 with probability and the value of 1 with (rademacher)is the the residuals at each bootstrap replication with a randomly generated variablethat takes the value of 1 with probability / 5 and otherwise, where = (1+ 5) Difference-in-differences estimation 5webbmultiplies the residuals at each bootstrap replication with a randomly generated variablethat takes the values 3/2, 2/2, 1/2, 1/2, 2/2, and 3/2, each withprobability 1 the residuals at each bootstrap replication with a randomly generated normaldistribution variable with the first four moments given by 0, 1, 0, and the residuals at each bootstrap replication with a randomly generated gammadistribution variable with shape parameter 4 and scale parameter 1 (#)performs#wild bootstrap replications.

9 The default isreps(1000).rseed(#)sets the random-number seed to#.blocksize(#)specifies that the wild bootstrap be performed in blocks, with#replications per wild bootstrap computation requires a matrix with dimensions(#groups) (#replications).If this is too large, you can reduce the matrix to(#groups) (#block size)and loop(#replications)/(#block size)times. When the same random seed is set, using a differentblock size does not change the numerical results; it only modifies the computation method. Theblock size must be less than or equal to the number of bootstrap replications. SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that allow forintragroup correlation (clusterclustvar), that are robust to some kinds of misspecification(robust), that are bias -corrected cluster robust using the degrees-of-freedom adjustment proposedby Bell and McCaffrey (2002) (hc2), and that use bootstrap sampling done at the group level(bootstrap); see [R] (clusterclustvar), the default, uses the first variable specified in thegroup(groupvars) (hc2)specifies bias -corrected cluster robust standard errors with the degrees-of-freedomadjustment proposed by Bell and McCaffrey (2002).

10 As withvce(hc2)in [R]regress, theresiduals are rescaled by the projection matrix to improve the small-sample properties of thevariance estimates. For more details, seeMethods and (robust)is equivalent to specifyingvce(clusterclustvar), whereclustvaristhe first variable specified in thegroup(groupvars)option. Reporting level(#); see [R]Estimation that the results for the outcome-model parameters be displayed. By default,the results for these auxiliary parameters are not :noci,nopvalues,noomitted,vsquish,noempt ycells,baselevels,allbaselevels,nofvlabe l,fvwrap(#),fvwrapon(style),cformat(%fmt ),pformat(%fmt),sformat(%fmt), andnolstretch; see [R]Estimation following option is available withdidregressandxtdidregressbut is not shown in thedialog box:coeflegend; see [R]Estimation didregress Difference-in-differences estimationRemarks and are presented under the following headings:IntroductionDID estimationGraphical diagnostics and testsSpecifying a 2-by-2 DIDS tandard-error considerationsDefault cluster robust standard errorsIntroductionDIDis one of the most venerable causal inference methods used by theaverage treatment effect on the treated group (ATET).


Related search queries