calc_covs: Calculate Vg and Ve from d-variate phenotype and kinship

Description Usage Arguments Value Examples

View source: R/calc_covs.R

Description

Calculate Vg and Ve from d-variate phenotype and kinship

Usage

1
2
3
4
5
6
7
8
calc_covs(
  pheno,
  kinship,
  X1pre = rep(1, nrow(kinship)),
  max_iter = 1e+06,
  max_prec = 1/1e+08,
  covariates = NULL
)

Arguments

pheno

n by d matrix of phenotypes

kinship

a kinship matrix, n by n

X1pre

n by c design matrix. c = 1 to ignore genotypes

max_iter

maximum number of EM iterations

max_prec

maximum precision for stepwise increments in EM algorithm

covariates

a n by n.cov matrix of numeric covariates

Value

a list with 2 named components, Vg and Ve. Each is a d by d covariance matrix.

Examples

1
calc_covs(pheno = matrix(data = rnorm(100), nrow = 50, ncol = 2), kinship = diag(50))

qtl2pleio documentation built on Dec. 3, 2020, 1:06 a.m.