View source: R/data_generation_functions.R
Call all helper functions to generate a dataframe with the simulated data pertaining to a single meta-analysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 | generate_meta_analysis(
job_id,
scenario_id,
bias_type,
bias_percentage = NULL,
bias_strength = NULL,
odds_ratio,
heterogeneity,
ma_size,
prob_cg_distr,
n_cg_distr,
bias_table
)
|
job_id |
User defined job_id. Used for determining a unique seed. |
scenario_id |
Unique id fer scenario = constellation of simulation parameters. |
bias_type |
Bias type can either be "p" or "es". |
bias_percentage |
Percentage of studies that will be removed to to publication bias. Only needs to be provided when bias type = "es". |
bias_strength |
String indicating bias severity "moderate" or "strong". only needs to be supplied when bias type = "p". |
odds_ratio |
True underlying effect of the symulated meta-analysis. |
heterogeneity |
Numeric value indicating the heterogeneity fraction. |
ma_size |
Intended number of studies to be included in final meta-analysis (after publication bias). |
prob_cg_distr |
Probablility of an event in the control group. Can be any value or function that evaluates to a numeric value between 0 and 1. |
n_cg_distr |
Sample size in control group (= sample size in exposed group) Can be any value or function that evaluates to an integer. |
bias_table |
List of pvalue cut-offs and corresponding selection probabilities list element names must correspond to elements of bias strength #' @return A dataframe with ma-size rows. A subset of rows returned by simulate_unbiased_study_set() |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.