we remove a fraction of events from a specific site
Details
we determine the absolute number of events per patient for removal. Then them remove them at the first visit. We intentionally allow fractions
Examples
df_visit <- sim_test_data_study(n_pat = 100, n_sites = 10)
df_ur <- sim_out(df_visit, "A", site_id = "S0001", factor_event = - 0.35)
# Example cumulated event for first patient with 35% under-reporting
df_ur[df_ur$site_id == "S0001" & df_ur$patient_id == "P000001",]$n_event
#> [1] 0.0 0.0 0.0 0.5 1.5 2.5 3.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5
#> [20] 4.5 6.5 6.5 6.5 6.5
# Example cumulated event for first patient with no under-reporting
df_visit[df_visit$site_id == "S0001" & df_visit$patient_id == "P000001",]$n_event
#> [1] 0 2 2 4 5 6 7 8 8 8 8 8 8 8 8 8 8 8 8 8 10 10 10 10