Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

randomPed

Random pedigree


Description

Creates a random medical pedigree with specified number of generations.

Usage

randomPed(gen, lambda = 2, penetrances = c(0, 1, 1), naff = "last.gen",
  founder.mut = 1)

Arguments

gen

an integer in the interval [2,5] indicating the number of generations.

lambda

a positive numeric. For each descendant of the first generation, the number of offspring is sampled from a Poisson distribution with parameter lambda.

penetrances

a numeric of length 3, as in setModel.

naff

an integer specifying a lower bound on the number of affected individuals, or the character 'last.gen'. The latter produce a pedigree where at least one in the youngest generation is affected.

founder.mut

an integer, the number of disease alleles to be distributed among the founders.

Details

The function produces a random simple pedigree. Each founder is given at most one disease allele. At least one of the two top founders carries a disease allele.

Value

A linkdat object.

Author(s)

Magnus Dehli Vigeland

See Also

Examples

plot(randomPed(3))

# gives error message: Not enough founder mutations
## Not run: 
randomPed(gen=4, penetrances=c(0,0,1), naff=2, founder.mut=1)

## End(Not run)

paramlink

Parametric Linkage and Other Pedigree Analysis in R

v1.1-2
GPL (>= 2)
Authors
Magnus Dehli Vigeland [aut, cre], Thore Egeland [ctb], Guro Doerum [ctb]
Initial release
2018-01-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.