Description Usage Arguments Value
The resulting data frame can be directly passed to parallel.trends.plot or be used to generate a more customized manual plot.
1 2 3 4 5 6 7 8 9 10 11 12 |
df |
The data frame used for the DID regression |
timevar |
Name of the time variable, e.g. "year" |
yvar |
Name of the dependent variable |
treatdummy |
Name of the 0-1 dummy variable indicating whether the observation belongs to the treatment group |
expdummy |
Name of the 0-1 dummy variable indicating whether the observation is in an experimental period, i.e. a period in which the treatment group gets treatment. |
treat_exp_dummy |
Optional name of the interaction variable treatdummy * expdummy. If not given a column with name "treat_exp_dummy" is added to the data frame. |
cvars |
Names of the additional control variables used in the DID regression. |
extravars |
Names of variables that are not used in the regression but shall be included in the returned data frame. |
add.no.control |
If TRUE (default) add rows that are used for a parallel trends diagnostic plot that assumes that no control variables are added. |
A data frame that can be passed to parallel.trends.plot. Essential columns are .t, .y, .group, .exp, .mode. Note that the data frame only contains rows that have no NA for the specified columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.