Learn R Programming

gap (version 1.1-1)

kin.morgan: kinship matrix for simple pedigree

Description

kinship matrix according to Morgan v2.1

Usage

kin.morgan(ped)

Arguments

ped
pedigree id and family trio (id, father id, morther id

Value

  • The returned value is a list containing:
  • kinthe kinship matrix in vector form
  • kin.matrixthe kinship matrix

References

Morgan V2.1 http://www.stat.washington.edu/thompson/Genepi/MORGAN/Morgan.shtml

See Also

gif

Examples

Run this code
# Werner syndrome pedigree
werner<-c(
 1, 0,  0,  1,
 2, 0,  0,  2,
 3, 0,  0,  2,
 4, 1,  2,  1,
 5, 0,  0,  1,
 6, 1,  2,  2,
 7, 1,  2,  2,
 8, 0,  0,  1,
 9, 4,  3,  2,
10, 5,  6,  1,
11, 5,  6,  2,
12, 8,  7,  1,
13,10,  9,  2,
14,12, 11,  1,
15,14, 13,  1)
werner<-t(matrix(werner,nrow=4))
kin.morgan(werner[,1:3])

Run the code above in your browser using DataLab