Description Usage Arguments Value Examples
View source: R/simulation_multi.R
This functions simulate a beta vector with the variation of genetic effect being controlled in a pre-specified range. It takes maf vector of length P, range of desired variation due to genetic effect, and the range of the number of causal variants. The variation is calculated by
2 ∑_p β_p^2 f_p (1 - f_p)
where f_p is the allele frequency of variant p and β_p is the log aFC of variant p.
1 | create_betas(maf, genetic_var, ncausal)
|
maf |
allele frequencies of the variants of interest |
genetic_var |
the range of variation due to genetic effect |
ncausal |
the range of the number of causal variants |
a vector of simulated beta vector
1 2 3 4 5 | create_betas(
maf = runif(100),
genetic_var = c(0.015, 0.075),
ncausal = c(1, 3)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.