beta_func: Simulate beta

beta_funcR Documentation

Simulate beta

Description

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.


Holdols/genstats documentation built on June 10, 2022, 6:05 a.m.