sim {did} | R Documentation |
sim
Description
An internal function that builds simulated data, computes
ATT(g,t)'s and some aggregations. It is useful for testing the inference
procedures in the did
function.
Usage
sim(
sp_list,
ret = NULL,
bstrap = TRUE,
cband = TRUE,
control_group = "nevertreated",
xformla = ~X,
est_method = "dr",
clustervars = NULL,
panel = TRUE
)
Arguments
sp_list |
A list of simulation parameters. See |
ret |
which type of results to return. The options are |
bstrap |
whether or not to use the bootstrap to conduct inference (default is TRUE) |
cband |
whether or not to compute uniform confidence bands in the call to |
control_group |
Whether to use the "nevertreated" comparison group (the default) or the "notyettreated" as the comparison group |
xformla |
Formula for covariates in |
est_method |
Which estimation method to use in |
clustervars |
Any additional variables which should be clustered on |
panel |
whether to simulate panel data (the default) or otherwise repeated cross sections data |
Value
When ret=NULL
, returns the results of the call to att_gt
, otherwise returns
1 if the specified test rejects or 0 if not.