Internal function for sim_sites
,
filter all visits greater than max_visit_med75_study
returns dataframe with one column for studies and one column with nested
patient data.
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"
df_site <- site_aggr(df_visit)
df_pat_pool <- pat_pool(df_visit, df_site)
df_pat_pool
#> # A tibble: 1 × 2
#> study_id pat_pool
#> <chr> <list>
#> 1 A <tibble [1,637 × 3]>