besthint {kinship}R Documentation

Create a hints matrix for a pedigree.

Description

A pedigree structure can contain a hints matrix which helps to reorder the pedigree (e.g. left-to-right order of children within family) so as to plot with minimal distortion. This routine trys out a large number of configurations, finding the best by brute force.

Usage

besthint(ped, wt=c(1000, 10, 1), tolerance=0)

Arguments

ped a pedigree object
wt relative weights for three types of "distortion" in a plotted pedigree. The final score for a pedigree is the weighted sum of these; the lowest score is considered the best. The three components are 1: the number of dotted lines, connecting two instances of the same person; 2: the lengths of those dotted lines; and 3: the horizontal offsets between parent/child pairs.
tolerance the threshold for acceptance. If any of the orderings that are attempted have a score that is less than or equal to this value, the routine ceases searching for a better one.

Details

Assume that a pedigree has k founding couples, i.e., husband-wife pairs for which neither has a parent in the pedigree. The routine tries all k!/2 possible left to right orderings of the founders (in random order), uses the autohint function to optimize the order of children within each family, and computes a score. The hints matrix for the first pedigree to match the tolerance level is returned, or that for the best score found if none match the tolerance.

Value

a hints matrix

See Also

pedigree, plot.pedigree, autohint

Examples

## Not run: 
# Find a good plot, only trying to avoid dotted connectors
myped$hints <- besthint(myped, wt=c(1000,100,0))
## End(Not run)

[Package kinship version 1.1.0-21 Index]