Code:
didregress (satis) (procedure), group(hospital) time(month)
The first set of parentheses is used to specify the outcome of interest followed by the covariates in the model. In this case, there are no covariates. The second set of parentheses is used to specify the binary variable that indicates the treated observations, procedure. The group() and time() options are used to construct group and time fixed effects that are included in the model. The variable specified in group() defines the level of clustering for the default cluster–robust standard errors. For this example, we cluster at the hospital level.
1. Whether this binary variable is the interaction of post*treatment. The value is 1 if the observation belongs to the treatment group and after the event date, and 0 otherwise.
2. While I generate the variables treat1(value 1 if belongs to treatment group and 0 otherwise) and post1(value 1 if after treatment day and 0 otherwise), I run the regression as below
Code:
xtdidregress (y $covariates) (treat1#post1), group(firm) time(year)
Code:
for the treatment specification: interactions not allowed r(101);
Code:
gen pt=treat1*post1
0 Response to Confusion about command didregress in DiD help file
Post a Comment