get_ecd_values {simaerep} | R Documentation |
Get empirical cumulative distribution values of pval or prob_lower
Description
Test function, test applicability of poisson test, by calculating
the bootstrapped probability of obtaining a specific p-value or lower, use in combination with
sim_studies()
.
Usage
get_ecd_values(df_sim_studies, df_sim_sites, val_str)
Arguments
df_sim_studies |
dataframe, generated by |
df_sim_sites |
dataframe, generated by |
val_str |
c("prob_low","pval") |
Details
trains a ecdf function for each studies based on the results
of sim_studies()
Value
dataframe with the following columns:
- study_id
study identification
- site_number
site identification
- visit_med75
median(max(visit)) * 0.75
- mean_ae_site_med75
mean AE at visit_med75 site level
- mean_ae_study_med75
mean AE at visit_med75 study level
- pval/prob_low
p-value as returned by
poisson.test
- pval/prob_low_ecd
p-value as returned by
poisson.test
Examples
df_visit <- sim_test_data_study(n_pat = 100, n_sites = 5,
frac_site_with_ur = 0.4, ur_rate = 0.3)
df_visit$study_id <- "A"
df_site <- site_aggr(df_visit)
df_sim_sites <- sim_sites(df_site, df_visit, r = 100)
df_sim_studies <- sim_studies(
df_site = df_site,
df_visit = df_visit,
r = 3,
parallel = FALSE,
poisson_test = TRUE,
prob_lower = TRUE
)
get_ecd_values(df_sim_studies, df_sim_sites, "prob_low")
get_ecd_values(df_sim_studies, df_sim_sites, "pval")
[Package simaerep version 0.5.0 Index]