getVarExp {Mangrove} | R Documentation |
Calculating liability-scale variance explained by genetic risk variants
Description
These functions calculate the variance explained on the liability scale by the genetic risk variants described by a MangroveORs
object.
Usage
getVarExp(ORs, K)
getVarExpSim(ORs,K,iter=1000)
Arguments
ORs |
An object of class |
K |
The prevalence of the disease. |
iter |
The number of individuals sampled for variance estimation. |
Details
getVarExp
calculates the variance explained analytically, by converting the odds ratios to liability-scale units, and combining them together additively. getVarExpSim
simulates genotypes from the allele frequencies, performs risk prediction on them, converts the resulting posteriors to liabilities, and directly measures the variance of the sample.
Value
The proportion of variance explained, as a single numeric value.
Examples
data(exampleORs)
getVarExp(exampleORs,0.02)
getVarExpSim(exampleORs,0.02)
[Package Mangrove version 1.21 Index]