Learn R Programming

simaerep (version 1.0.0)

eval_sites: Evaluate sites.

Description

Correct under-reporting probabilities using p.adjust.

Usage

eval_sites(
  df_sim_sites,
  method = "BH",
  under_only = TRUE,
  visit_med75 = TRUE,
  ...
)

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

p-value as returned by poisson.test

prob

bootstrapped probability

Arguments

df_sim_sites

dataframe generated by sim_sites or sim_inframe()

method

character, passed to stats::p.adjust(), if NULL no multiplicity correction will be made.

under_only

Logical, compute under-reporting probabilities only. only applies to the classic algorithm in which a one-sided evaluation can save computation time. Default: FALSE

visit_med75

Logical, should evaluation point visit_med75 be used. Compatible with inframe and classic version of the algorithm. Default: FALSE

...

use to pass r_sim_sites parameter to eval_sites_deprecated()

See Also

site_aggr, sim_sites, sim_inframe, p.adjust

Examples

Run this code
df_visit <- sim_test_data_study(
  n_pat = 100,
  n_sites = 5,
  ratio_out = 0.4,
  factor_event_rate = 0.6
  ) %>%
  # internal functions require internal column names
  dplyr::rename(
    n_ae = n_event,
    site_number = site_id,
    patnum = patient_id
  )

df_site <- site_aggr(df_visit)

df_sim_sites <- sim_sites(df_site, df_visit, r = 100)

df_eval <- eval_sites(df_sim_sites)
df_eval

Run the code above in your browser using DataLab