get_pat_pool_config {simaerep} | R Documentation |
Configure study patient pool by site parameters.
Description
Internal Function used by sim_sites()
Usage
get_pat_pool_config(df_visit, df_site, min_n_pat_with_med75 = 1)
Arguments
df_visit |
dataframe |
df_site |
dataframe as created by site_aggr() |
min_n_pat_with_med75 |
minimum number of patients with visit_med_75 for simulation, Default: 1 |
Details
For simulating a study we need to configure the study patient pool to match the configuration of the sites
Value
dataframe
Examples
df_visit1 <- sim_test_data_study(n_pat = 100, n_sites = 5,
frac_site_with_ur = 0.4, ur_rate = 0.6)
df_visit1$study_id <- "A"
df_visit2 <- sim_test_data_study(n_pat = 1000, n_sites = 3,
frac_site_with_ur = 0.2, ur_rate = 0.1)
df_visit2$study_id <- "B"
df_visit <- dplyr::bind_rows(df_visit1, df_visit2)
df_site <- site_aggr(df_visit)
df_config <- get_pat_pool_config(df_visit, df_site)
df_config
[Package simaerep version 0.5.0 Index]