calculateVarFrac: Calculate the fraction of phenotypic variance explained by as...

Description Usage Arguments

View source: R/varFrac.R

Description

This version does not take into account potential biases in neither the estimation of effect sizes nor the estimation of the correlation matrix

Usage

1
calculateVarFrac(std_bG, std_bI, matcor, varY, type)

Arguments

std_bG

is the vector of standardized genetic effect sizes

std_bI

is the vector of standardized interaction effect sizes

matcor

is the genotype correlation matrix

varY

is the phenotypic variance in the pooled sample

type

indicates wether only genetic or interactions effects should be considered or if both should be considered jointly.

@return The fraction of phenotypic variance explained by user-specified effects.

@examples std_bG = rnorm(5,0,0.01) std_bI = rnorm(5,0,0.001) matcor = cor(matrix(runif(5*5,1,5),nrow=5)) varY = 2.25 calculateVarFrac(std_bG, std_bI, matcor, varY, "G") calculateVarFrac(std_bG, std_bI, matcor, varY, "I") calculateVarFrac(std_bG, std_bI, matcor, varY, "J")

@importFrom MASS ginv @export


vincela/VarExp documentation built on May 29, 2019, 12:42 p.m.