{smcl}
{* *! version 1 2018-07-27}{...}
{viewerjumpto "Syntax" "did_multipleGT##syntax"}{...}
{viewerjumpto "Description" "did_multipleGT##description"}{...}
{viewerjumpto "Options" "did_multipleGT##options"}{...}
{viewerjumpto "Examples" "did_multipleGT##examples"}{...}
{viewerjumpto "Saved results" "did_multipleGT##saved_results"}{...}
{title:Title}
{p 4 8}{cmd:did_multipleGT} {hline 2} Estimation in sharp Difference-in-Difference designs with multiple groups and periods.{p_end}
{marker syntax}{...}
{title:Syntax}
{p 4 8}{cmd:did_multipleGT Y G T D} {ifin}
[{cmd:,}
{cmd:controls(}{it:varlist}{cmd:)}
{cmd:placebo(}{it:#}{cmd:)}
{cmd:dynamic(}{it:#}{cmd:)}
{cmd:breps(}{it:#}{cmd:)}
{cmd:cluster(}{it:varname}{cmd:)}
{cmd:{ul:newc}ateg(}{it:numlist}{cmd:)}
]{p_end}
{synoptset 28 tabbed}{...}
{marker description}{...}
{title:Description}
{p 4 8}{cmd:did_multipleGT} can be used in DID designs with multiple groups and periods, and where all units in the same group and period have the same treatment (sharp designs), as is for instance the case when the treatment is a county- or state-level variable. It computes the Wald-TC estimator of the instantaneous treatment effect among switchers introduced in Section 3.3 of Chaisemartin and D'Haultfoeuille (2018).
It also computes placebo estimators that can be used to assess the plausibility of the common trends assumption underlying the Wald-TC estimator (see Section 3.3 of Chaisemartin and D'Haultfoeuille, 2018).
Finally, in staggered adoption designs where treatment is binary and where groups' treatment is weakly increasing with time, it computes Wald-TC estimators of the dynamic treatement effects among switchers (see Section 5.2 of Chaisemartin and D'Haultfoeuille, 2018). {cmd:did_multipleGT} makes use of the {cmd:fuzzydid} package (see Chaisemartin et al., Forthcoming), so {cmd:fuzzydid} should be installed before using {cmd:did_multipleGT}.
{p_end}
{p 4 8}{cmd:Y} is the outcome variable.{p_end}
{p 4 8}{cmd:G} is the group variable.{p_end}
{p 4 8}{cmd:T} is the time period variable. The interval between two consecutive time periods should be equal to 1. If that is not the case, the user should make sure to transform her time variable so it satisfies that requirement.{p_end}
{p 4 8}{cmd:D} is the treatment variable.
{marker options}{...}
{title:Options}
{p 4 8}{cmd:controls(}{it:varlist}{cmd:)} specifies the names of all the control variables that need to be included in the estimation.{p_end}
{p 4 8}{cmd:placebo(}{it:#}{cmd:)} specifies the number of periods before switchers' treatment changes for which placebo estimators have to be estimated.{p_end}
{p 4 8}{cmd:dynamic(}{it:#}{cmd:)} specifies the number of periods after switchers' treatment has changed until which dynamic treatment effects have to be estimated. That option should only be used in staggered adoption designs.{p_end}
{p 4 8}{cmd:breps(}{it:#}{cmd:)} specifies the number of bootstrap replications to be used in the computation of estimators' standard errors. If that option is not specified, the command does not compute estimators' standard errors.{p_end}
{p 4 8}{cmd:cluster(}{it:varname}{cmd:)} computes the standard errors of the estimators using a block bootstrap at the {it:varname} level. Only one clustering variable is allowed.{p_end}
{p 4 8}{cmd:newcateg(}{it:numlist}{cmd:)} groups some values of the treatment together when computing the estimators. This option may be useful when the treatment takes a large number of values. The user needs to specify the upper bound of
each set of values of the treatment she wants to group. For instance, if {cmd:D} takes the values 0,1,2,3,4.5,7,8, and she wants to group together units with D in {0,1,2}, D in {3,4.5}, and D in {7,8}, she needs
to write {cmd:newcateg(2 4.5 8)}.{p_end}
{hline}
{marker saved_results}{...}
{title:Saved results}
{p 4 8}In what follows, let {it:k} denote the number specified in the {cmd:placebo(}{it:#}{cmd:)} option, and let {it:j} denote the number specified in the {cmd:dynamic(}{it:#}{cmd:)} option. {cmd:did_multipleGT} saves the following in {cmd:e()}:
{synoptset 20 tabbed}{...}
{synopt:{cmd:e(effect_0)}} estimated effect of the treatment at the time when switchers switch.{p_end}
{synopt:{cmd:e(N_effect_0)}} number of observations used in the estimation of {cmd:e(effect_0)}.{p_end}
{synopt:{cmd:e(effect_0_se)}} estimated standard error of {cmd:e(effect_0)}, if the option {cmd:breps(}{it:#}{cmd:)} has been specified.{p_end}
{synopt:{cmd:e(placebo_i)}} estimated placebo effect i periods before the switch, for all i in 0, 1, ..., k.{p_end}
{synopt:{cmd:e(N_placebo_i)}} number of observations used in the estimation of {cmd:e(placebo_i)}.{p_end}
{synopt:{cmd:e(placebo_i_se)}} estimated standard error of {cmd:e(placebo_i)}, if the option {cmd:breps(}{it:#}{cmd:)} has been specified.{p_end}
{synopt:{cmd:e(effect_i)}} estimated effect of the treatment i periods after the switch, for all i in 1, ..., j.{p_end}
{synopt:{cmd:e(N_effect_i)}} number of observations used in the estimation of {cmd:e(effect_i)}.{p_end}
{synopt:{cmd:e(effect_i_se)}} estimated standard error of {cmd:e(effect_i)}, if the option {cmd:breps(}{it:#}{cmd:)} has been specified.{p_end}
{marker Graph}{...}
{title:Graph}
{p2col 5 20 24 2: If the option breps has been specified, the command returns a graph with all the estimated treatment effects and placebos, and their 95% confidence intervals constructed using a normal approximation.}{p_end}
{title:References}
{p 4 8}de Chaisemartin, C. and D'Haultfoeuille,X. 2018.
{browse "https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3148607":Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects}.{p_end}
{p 4 8}de Chaisemartin, C. and D'Haultfoeuille, X. and Guyonvarch, Y.
{browse "https://sites.google.com/site/clementdechaisemartin/statapaper_fuzzydid.pdf":Fuzzy Differences-in-Differences with Stata}.
{it:Forthcoming in the Stata Journal}.{p_end}
{title:Authors}
{p 4 8}Clément de Chaisemartin, University of California at Santa Barbara, Santa Barbara, California, USA.
{browse "mailto:clementdechaisemartin@ucsb.edu":clementdechaisemartin@ucsb.edu}.{p_end}
{p 4 8}Xavier D'Haultfoeuille, CREST, Palaiseau, France.
{browse "mailto:xavier.dhaultfoeuille@ensae.fr":xavier.dhaultfoeuille@ensae.fr}.{p_end}
{p 4 8}Yannick Guyonvarch, CREST, Palaiseau, France.
{browse "mailto:yannick.guyonvarch@ensae.fr":yannick.guyonvarch@ensae.fr}.{p_end}