This version does not take into account potential biases in neither the estimation of effect sizes nor the estimation of the correlation matrix
1 | calculateVarFrac(std_bG, std_bI, matcor, varY, type)
|
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.