Description Usage Arguments Value Examples
idd
takes a long-form panel dataset containing event count and exposure data, obtains the optimal controls and estimates an incidence difference-in-differences model.
1 2 |
eventvar |
Name of the event count variable. |
popvar |
The person-time (or another exposure) variable. |
treatvar |
The treatment group indicator dummy (0 for controls, 1 for treated units). |
postvar |
The post-period indicator dummy (0 for all time points in the pre-intervention period, 1 for all time points in the post-period) |
timevar |
The time variable (can be coded on any scale). |
idvar |
The panel id variable. |
names |
A variable containing unit names (optional). Changes the output of id.selected to show unit names of selected controls. |
print |
Print results? Default=TRUE. |
data |
A long-form panel dataset containing the supplied variables. |
mult |
Multiplier for the rates produced by print (default=100000). |
Returns a list containing the following elements:
$Resdat
: a data frame containing the results.
$cv_errors
: a data frame containing the cross-validation errors for the k-minimizing function.
$supp_stats
: a data frame containing supplementary statistics (average effects, relative effects, p-values etc).
$id_controls
: a data frame containing information on the selected controls.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.