get_config | R Documentation |
Get Portfolio configuration from a dataframe aggregated on
patient level with max_ae and max_visit. Will filter studies with only a few
sites and patients and will anonymize IDs. Portfolio configuration can be
used by sim_test_data_portfolio
to generate data for an
artificial portfolio.
get_config(
df_site,
min_pat_per_study = 100,
min_sites_per_study = 10,
anonymize = TRUE,
pad_width = 4
)
df_site |
dataframe aggregated on patient level with max_ae and max_visit |
min_pat_per_study |
minimum number of patients per study, Default: 100 |
min_sites_per_study |
minimum number of sites per study, Default: 10 |
anonymize |
logical, Default: TRUE |
pad_width |
padding width for newly created IDs, Default: 4 |
dataframe with the following columns:
study identification
mean AE per visit per study
site
standard deviation of maximum patient visits per site
mean of maximum patient visits per site
number of patients
sim_test_data_study
get_config
sim_test_data_portfolio
sim_ur_scenarios
get_portf_perf
df_visit1 <- sim_test_data_study(n_pat = 100, n_sites = 10,
frac_site_with_ur = 0.4, ur_rate = 0.6)
df_visit1$study_id <- "A"
df_visit2 <- sim_test_data_study(n_pat = 100, n_sites = 10,
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_max <- df_visit %>%
dplyr::group_by(study_id, site_number, patnum) %>%
dplyr::summarise(max_visit = max(visit),
max_ae = max(n_ae),
.groups = "drop")
df_config <- get_config(df_site_max)
df_config
df_portf <- sim_test_data_portfolio(df_config)
df_portf
df_scen <- sim_ur_scenarios(df_portf,
extra_ur_sites = 2,
ur_rate = c(0.5, 1))
df_scen
df_perf <- get_portf_perf(df_scen)
df_perf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.