## S3 method for class 'pedigree':
plot(x, id = x$id, status = x$status, affected =
x$affected, cex = 1, col = 1, symbolsize = 1, branch =
0.6, packed = TRUE, align = c(1.5,2), width = 8,
density = c(-1, 35, 55, 25), mar = c(4.1, 1, 4.1, 1),
angle = c(90, 65, 40, 0), keep.par = FALSE, subregion,
...)
par
functionThe second is align
, a vector of 2 alignment parameters $a$ and $b$.
For each set of siblings at a set of locations
x
and with parents at p=c(p1,p2)
the
alignment penalty is
$$(1/k^a)\sum{i=1}{k} [(x_i - (p1+p2)/2)]^2$$
{sum(x- mean(p))^2/(k^a)}
where k is the number of siblings in the set.
when $a=1$ moving a sibship with $k$ sibs one unit to the left or
right of optimal will incur the same cost as moving one with only 1 or
two sibs out of place. If $a=0$ then large sibships are harder to move
than small ones, with the default value $a=1.5$ they are slightly easier
to move than small ones. The rationale for the default is as long as the
parents are somewhere between the first and last siblings the result looks
fairly good, so we are more flexible with the spacing of a large family.
By tethering all the sibs to a single spot they are kept close to
each other.
The alignment penalty for spouses is
$b(x_1 - x_2)^2$, which tends to keep
them together. The size of $b$ controls the relative importance of sib-parent
and spouse-spouse closeness.
pedigree
data(sample.ped)
pedAll <- pedigree(sample.ped$id, sample.ped$father, sample.ped$mother,
sample.ped$sex, #affected=sample.ped$affected,
affected=cbind(sample.ped$affected, sample.ped$avail),
famid=sample.ped$ped)
ped2 <- pedAll['2']
print(ped2)
## plot(ped2)
Run the code above in your browser using DataLab