Skip to contents

S3 Interface

simaerep()
Create simaerep object
plot(<simaerep>)
plot AE under-reporting simulation results

Main Functions

site_aggr()
Aggregate from visit to site level.
sim_sites()
Calculate prob_lower and poisson.test pvalue for study sites.
sim_inframe()
Calculate prob_lower for study sites using table operations
eval_sites()
Evaluate sites.
prune_to_visit_med75_inframe()
prune visits to visit_med75 using table operations
plot_study()
Plot ae development of study and sites highlighting at risk sites.
check_df_visit()
Integrity check for df_visit.

Simulate Data

sim_test_data_study()
simulate study test data
get_config()
Get Portfolio Configuration
sim_test_data_portfolio()
Simulate Portfolio Test Data

Test Functions

These functions are intented to check simaerep performance.

sim_studies()
Simulate studies.
sim_ur_scenarios()
Simulate Under-Reporting Scenarios
sim_ur()
simulate under-reporting
get_portf_perf()
Get Portfolio Performance

Helper Functions

These functions are intended to be called by other functions.

get_pat_pool_config()
Configure study patient pool by site parameters.
pat_pool()
Create a study specific patient pool for sampling
poiss_test_site_ae_vs_study_ae()
Poisson test for vector with site AEs vs vector with study AEs.
prob_lower_site_ae_vs_study_ae()
Calculate bootstrapped probability for obtaining a lower site mean AE number.
sim_test_data_patient()
simulate patient ae reporting test data
get_visit_med75()
Get visit_med75.
pat_aggr()
Aggregate visit to patient level.
get_site_mean_ae_dev()
Get site mean ae development.
aggr_duplicated_visits()
Aggregate duplicated visits.
exp_implicit_missing_visits()
Expose implicitly missing visits.
prep_for_sim()
Prepare data for simulation.
sim_after_prep()
Start simulation after preparation.
get_ecd_values()
Get empirical cumulative distribution values of pval or prob_lower
purrr_bar()
Execute a purrr or furrr function with a progress bar.
with_progress_cnd()
Conditional with_progress.
sim_scenario()
simulate single scenario
orivisit()
create orivisit object
is_simaerep()
is simaerep class
is_orivisit()
is orivisit class
max_rank()
Calculate Max Rank

Additional Plot Functions

These functions are intended for creating plots for the documentation.

plot_visit_med75()
Plot patient visits against visit_med75.
plot_sim_examples()
Plot multiple simulation examples.
plot_sim_example()
Plot simulation example.
plot_dots()
Plots AE per site as dots.