pve2beta | R Documentation |
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.
pve2beta(pve = 0.7, maf = 0.3, sigma = 1)
pve |
proportion of variance explained |
maf |
minor allele frequency |
sigma |
error standard deviation |
numeric
Timothee Flutre
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.