View source: R/allelic_het_simulator.R
1 2 3 4 5 6 7 8 9 10 11 12 13 | allelic_het_simulator(
betas,
n1 = 392814,
n2 = 260405,
maf_range = c(1e-04, 5e-04, 0.001, 0.0025, 0.005, 0.01),
enrichment_value = c(1, 5, 10, 20, 30, 50),
disease_prevalence = 0.005,
disease_prevalence_scale_stdy2 = 1.5,
n_simulated_datasets = 1000,
effect_direction = "increasing",
meta_compare = FALSE,
quantile_range = c(0.1, 0.5, 0.9)
)
|
betas |
data.frame whose columns denote the regression coefficients from study 1 (UKB) and separately study 2 (FinGen) studies. |
n1 |
numeric variable denoting the sample size of study 1. Default set to UKB sample size. |
n2 |
numeric variable denoting the sample size of study 2. Default set to FG sample size. |
maf_range |
numeric vector containing MAF values for study 1. Default considers a range of MAFs starting at the very rare MAF 0.01 \itemenrichment_valuenumeric vector denoting the allelic enrichment of study 2. Default considers a range of allelic enrichment values starting at no enrichment (i.e, a value of 1) to 50-fold enrichment. \itemdisease_prevalencenumeric vector denoting disease prevalence in study 1. Default is 0.5 \itemdisease_prevalence_scale_stdy2numeric scalar denoting the scaled increase/decrease of disease prevalence in study 2. Default is 1.5, i.e,. 0.75 \itemn_simulated_datasetsnumeric scalar denoting the number of datasets to simulate for each value of MAF and enrichment value. \itemeffect_directioncharacter denoting the direction of association (i.e., risk increasing or decreasing). Default is risk increasing \itemmeta_comparelogical denoting whether we perform the primary meta-analysis (i.e., the meta-analysis which combines 2 studies from different populations) or to compare the relative effects of two meta-analyses: (i) 2 studies from different populations and (ii) 2 studies from the same population. Default is FALSE, i.e, to perform our primary meta-analysis. \itemquantile_rangenumeric vector denoting the set of quantile summary values to record. Default is 0.1,0.5,0.9, i.e., the 1st, 5th (median) and 9th deciles. Returned are results from the simulated and theoretically predicted values of IVW-uplift generated from "n_simulated_datasets" per combination of MAF and enrichment value. Simulation protocol to generate and estimate IVW-uplift owing to allelic-heterogeneity between 2 population cohorts. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.