pve2beta: Proportion of variance explained

View source: R/quantgen.R

pve2betaR Documentation

Proportion of variance explained

Description

Computes the additive effect of a bi-allelic SNP (beta) given its PVE, MAF and error standard deviation for the simple linear regression model: for all i in 1,...,n, y_i = mu + beta * x_i + epsilon_i with epsilon_i ~ N(0, sigma^2). Indeed, for this model: var(y) = beta^2 var(x) + sigma^2. Assuming Hardy-Weinberg equilibrium: x ~ Binomial(2, maf); hence: var(x) = 2 f (1 - f). Moreover: PVE = var(beta x) / var(y). As a consequence, by fixing the PVE, the MAF and sigma, we can deduce a value for beta.

Usage

pve2beta(pve = 0.7, maf = 0.3, sigma = 1)

Arguments

pve

proportion of variance explained

maf

minor allele frequency

sigma

error standard deviation

Value

numeric

Author(s)

Timothee Flutre

Examples

## Not run: ## compare two different PVEs
pve2beta(pve=0.7, maf=0.3, sigma=1)
pve2beta(pve=0.2, maf=0.3, sigma=1)

## compare two different MAFs, depending on the PVE
pve2beta(pve=0.7, maf=0.4, sigma=1)
pve2beta(pve=0.7, maf=0.1, sigma=1)
pve2beta(pve=0.2, maf=0.4, sigma=1)
pve2beta(pve=0.2, maf=0.1, sigma=1)

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.