simaerep {simaerep} | R Documentation |
create simaerep object
Description
simulate AE under-reporting probabilities
Usage
simaerep(
df_visit,
param_site_aggr = list(method = "med75_adj", min_pat_pool = 0.2),
param_sim_sites = list(r = 1000, poisson_test = FALSE, prob_lower = TRUE),
param_eval_sites = list(method = "BH"),
progress = TRUE,
check = TRUE,
env = parent.frame(),
under_only = TRUE
)
Arguments
df_visit |
data frame with columns: study_id, site_number, patnum, visit, n_ae |
param_site_aggr |
list of parameters passed to site_aggr(), Default: list(method = "med75_adj", min_pat_pool = 0.2) |
param_sim_sites |
list of parameters passed to sim_sites(), Default: list(r = 1000, poisson_test = FALSE, prob_lower = TRUE) |
param_eval_sites |
list of parameters passed to eval_sites(), Default: list(method = "BH") |
progress |
logical, display progress bar, Default = TRUE |
check |
logical, perform data check and attempt repair with check_df_visit(), computationally expensive on large data sets. Default: TRUE |
env |
optional, provide environment of original visit data, Default: parent.frame() |
under_only |
logical compute under-reporting probabilities only, superseeds under_only parameter passed to eval_sites() and sim_sites(), Default: TRUE |
Details
executes site_aggr(), sim_sites() and eval_sites() on original visit data and stores all intermediate results. Stores lazy reference to original visit data for facilitated plotting using generic plot(x).
Value
simaerep object
See Also
site_aggr(), sim_sites(), eval_sites(), orivisit(), plot.simaerep()
Examples
df_visit <- sim_test_data_study(
n_pat = 100,
n_sites = 5,
frac_site_with_ur = 0.4,
ur_rate = 0.6
)
df_visit$study_id <- "A"
aerep <- simaerep(df_visit)
aerep
str(aerep)