Description Usage Arguments Value Examples
iddplacebo
estimates placebo studies on untreated units and produces pseudo p-values based on the empirical distribution of post/pre-RMSE ratios.
1 2 | iddplacebo(eventvar, popvar, treatvar, postvar, timevar, idvar, data,
iter = 10)
|
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. |
data |
A long-form panel dataset containing the supplied variables. |
iter |
The number of subsampling iterations. Defaults to 10, but 500-1000 are usually recommended. |
Returns a list containing the following elements:
$Resdata
: a data frame containing the results.
$ECDF
: the empirical cumulative distribution function.
$Effects
: a long-form data frame containing the estimated placebo effects.
$Treat.ratio
: a data frame containing the post/pre-RMSE ratio for the treated unit.
$supp_stats
: a data frame containing supplementary statistics (p-values etc).
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data(simpanel)
placebo.out <- iddplacebo(eventvar="y",
popvar="pop",
idvar="age",
timevar="time",
postvar="post",
treatvar="treat",
data=simpanel,
iter=50)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.