computeRSPs: Compute the relatedness summary parameters (RSPs) from a...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function computes the RSPs from the eigenvalues of twice the kinship matrix either directly or via a pedigree object.

Usage

1
2
computeRSPs(ped = NULL, kmat = NULL, thresholderror = 0.01,
  forcePD = TRUE)

Arguments

ped

a pedigree object from the 'kinship2' package. One of ped or kmat must be specified, but not both.

kmat

a kinship matrix

thresholderror

a scalar numeric of a permissible threshold that the mean eigenvalue is allowed to deviate from 1.

forcePD

logical of whether positive definiteness of kmat should be strictly enforced.

Details

This function calculates the eigenvalues from a pedigree object or twice the kinship matrix, and using these computes the RSPs: the variance of the eigenvalue and log eigenvalues, and the geometric mean.

Value

a pedRSP object with the calculated RSPs.

Author(s)

Jesse D. Raffa

See Also

pedigree kinship

Examples

1
2
3
4
5
6
7
8
require(kinship2)
# Example from kinship2 package
test1 <- data.frame(id  =c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14),
mom =c(0, 0, 0, 0, 2, 2, 4, 4, 6,  2,  0,  0, 12, 13),
dad =c(0, 0, 0, 0, 1, 1, 3, 3, 3,  7,  0,  0, 11, 10),
sex =c(1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2))
tped <- with(test1, pedigree(id, dad, mom, sex))
computeRSPs(ped=tped)

jraffa/pedRSP documentation built on May 19, 2019, 11:51 p.m.