# NOT RUN {
### Trivial example: Trio ###
x = nuclearPed(1)
ids = 1:3
multiPersonIBD(x, ids, complete = TRUE)
### Example due to Peter Green ###
# Three (pariwise) cousins arranged in two different ways,
# with different 3-way IBD coefficients.
threeCousins1 = ped(
id = c('gf','gm','gf1','gf2','gf3','gm1','gm2','gm3',
'f1','f2','f3','m1','m2','m3','c1','c2','c3'),
fid = c(0,0,0,0,0,0,0,0,'gf1','gf2','gf3','gf','gf','gf',
'f1','f2','f3'),
mid = c(0,0,0,0,0,0,0,0,'gm1','gm2','gm3','gm','gm','gm',
'm1','m2','m3'),
sex = c(1,2,1,1,1,2,2,2,1,1,1,2,2,2,1,1,1))
threeCousins2 = ped(
id = c('gf1','gf2','gf3','gm1','gm2','gm3','f1','f2','f3',
'm1','m2','m3','c1','c2','c3'),
fid = c(0,0,0,0,0,0,'gf2','gf3','gf1','gf3','gf1','gf2',
'f1','f2','f3'),
mid = c(0,0,0,0,0,0,'gm2','gm3','gm1','gm3','gm1','gm2',
'm1','m2','m3'),
sex = c(1,1,1,2,2,2,1,1,1,2,2,2,1,1,1))
ids = c('c1','c2','c3')
multiPersonIBD(threeCousins1, ids)
multiPersonIBD(threeCousins2, ids)
# }
Run the code above in your browser using DataLab