CovarMatrix: Calculation of covariance matrices from maternal and paternal...

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

The covariance matrix is set as maternal plus paternal LD matrix where the paternal part is a weighted average of sire-specific LD matrices.

Usage

1
CovarMatrix(exp_freq_mat, LDDam, LDSire, Ns)

Arguments

exp_freq_mat

[MATRIX] paternal EXPECTATION matrix

LDDam

[MATRIX] maternal Linkage Disequilibrium matrix

LDSire

[LIST] Linkage disequilibrium matrices for the sires; each element of the list corresponds to a family

Ns

[VECTOR] family size for each sire s

Details

The internal suMM function works on lists!

Value

covK

(p x p) matrix of covariance between markers

Examples

1
2
3
4
5
6
7
 data(testdata)
 G <- Haplo2Geno(H.sire)
 E <- ExpectMat(G)
 LDfam2 <- LDsire(H.sire, pos.chr, family = 3:4)
 LDfam3 <- LDsire(H.sire, pos.chr, family = 5:6)
 ## covariance matrix based on sires 2 and 3 only, each with 100 progeny
 K <- CovarMatrix(E[2:3, ], LDDam = matLD, LDSire = list(LDfam2, LDfam3), Ns = c(100, 100))

hscovar documentation built on April 13, 2021, 9:06 a.m.

Related to CovarMatrix in hscovar...