Learn R Programming

pcgen (version 0.2.0)

gencovTest: Estimate genetic covariances between all pairs of traits, and test their significance

Description

For each pair of traits in suffStat, we fit a bivariate mixed model, and perform a likelihood ratio test for the null-hypothesis of zero genetic covariance.

Usage

gencovTest(suffStat, max.iter = 200, out.cor = TRUE)

Arguments

suffStat

A data.frame with (p + 1) columns, of which the first column is the factor G (genotype), and subsequent p columns contain traits. It should not contain covariates or QTLs.

max.iter

Maximum number of iterations in the EM-algorithm, used to fit the bivariate mixed model

out.cor

If TRUE, the output will contain estimates of genetic correlations; otherwise covariances. The pvalues are always for genetic covariance.

Value

A list with elements pvalues and out.cor, which are both p x p matrices

References

Kruijer, W., Behrouzi, P., Rodriguez-Alvarez, M. X., Wit, E. C., Mahmoudi, S. M., Yandell, B., Van Eeuwijk, F., (2018, in preparation), Reconstruction of networks with direct and indirect genetic effects.

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
    data(simdata)
    test <- gencovTest(suffStat= simdata, max.iter = 200, out.cor= TRUE )
  
# }

Run the code above in your browser using DataLab