Learn R Programming

ALLSPICER (version 0.1.9)

get_true_beta: get_true_beta

Description

simulation function: simulate true effect size information of `n_var` variants for two phenotypes

Usage

get_true_beta(n_var, c, pi, sigma, null = TRUE)

Value

A 2x`n_var` matrix of effect size information for `n_var` variants (first row corresponds to the first phenotype, second row corresponds to the second phenotype)

Arguments

n_var

total number of variants

c

slope between the two sets of variant effect sizes, only applicable when `null` == TRUE

pi

probability of variant of having no effect on the phenotype

sigma

variance of the two sets of effect sizes

null

whether to simulate data under the null hypothesis (no linear relationship) or the alternative hypothesis

Examples

Run this code
true_beta <- get_true_beta(n_var=100, c=0.6, pi=0.5, sigma=1, null=TRUE)

Run the code above in your browser using DataLab