Skip to contents

The function simulates the casual effect of each SNP. Since there are C causal SNPs the distribution of beta is sampled from is a normal distribution with zero mean and variance as the heritability divided by casual SNPs.

Usage

beta_func(M = 1e+05, h2 = 0.5, C = 1000)

Arguments

M

Size of the beta vector.

h2

The heritability of trait.

C

Amount of causal SNPs.

Value

A vector of size M containing a value from rnorm(1, 0, sqrt(h2/C)) at C random places.