getM2varcomp: getM2varcomp

Description Usage Arguments Details Value Examples

View source: R/predCrossVar_frequentist_univar.R

Description

Computes the genomic variance component accounting account for linkage disequilibrium, which Lehermeier called Method 2 or "M2".

Usage

1
getM2varcomp(effects, varcovarmat, type)

Arguments

effects

vector of SNP effects

varcovarmat

square, symmetric var-covar matrix, estimator of LD between loci

type

string, "add" or "dom". If "dom" will square varcovarmat to get correct varcomp.

Details

Make sure **effects** and **varcovarmat** are in same order. This might use _alot_ of RAM and take _alot_ of time as it involves very large matrix operations. May be worth computing in an R session using multi-threaded BLAS

Value

additive or dominance genomic variance estimate accounting account for linkage disequilibrium

Examples

1
2
3
Z<-centerDosage(M)
varcovarmat<-genoVarCovarMatFunc(Z)
VarAddM2<-getM2varcomp(effects,varcovarmat,"add")

wolfemd/predCrossVar documentation built on Dec. 21, 2020, 10:14 a.m.