getVarExp: Calculating liability-scale variance explained by genetic...

Description Usage Arguments Details Value Examples

View source: R/getVarExp.R

Description

These functions calculate the variance explained on the liability scale by the genetic risk variants described by a MangroveORs object.

Usage

1
2
getVarExp(ORs, K)
getVarExpSim(ORs,K,iter=1000)

Arguments

ORs

An object of class MangroveORs

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

1
2
3

Example output

[1] 0.02438337
[1] 0.02387013

Mangrove documentation built on May 1, 2019, 9:10 p.m.