Description Usage Arguments Details Value Author(s) See Also Examples
This function computes the RSPs from the eigenvalues of twice the kinship matrix either directly or via a pedigree object.
1 2 | computeRSPs(ped = NULL, kmat = NULL, thresholderror = 0.01,
forcePD = TRUE)
|
ped |
a pedigree object from the 'kinship2' package. One of |
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. |
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.
a pedRSP object with the calculated RSPs.
Jesse D. Raffa
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.