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

setModel

Set, change or display the model parameters for 'linkdat' objects


Description

Functions to set, change and display model parameters involved in parametric linkage analysis.

Usage

setModel(x, model = NULL, chrom = NULL, penetrances = NULL,
  dfreq = NULL)

## S3 method for class 'linkdat.model'
print(x, ...)

Arguments

x

in setModel: a linkdat object. In print.linkdat.model: a linkdat.model object.

model

NULL, or an object of class linkdat.model, namely a list with elements chrom, penetrances and dfreq. In the setModel function, the model argument can be one of the integers 1-4, with the following meanings:

1 = autosomal dominant; fully penetrant, dfreq=1e-5

2 = autosomal recessive; fully penetrant, dfreq=1e-5

3 = X-linked dominant; fully penetrant, dfreq=1e-5

4 = X-linked recessive; fully penetrant, dfreq=1e-5

chrom

a character, either 'AUTOSOMAL' or 'X'. Lower case versions are allowed and will be converted automatically.

penetrances

if chrom=='AUTOSOMAL': a numeric of length 3 - (f0, f1, f2) - where fi is the probability of being affected given i disease alleles.

If chrom=='X': a list of two vectors, containing the penetrances for each sex: penetrances = list(male=c(f0, f1), female=c(f0, f1, f2)).

dfreq

the population frequency of the disease allele.

...

further parameters

Value

setModel returns a new linkdat object, whose model entry is a linkdat.model object: A list containing the given chrom, penetrances and dfreq.

Author(s)

Magnus Dehli Vigeland

See Also

Examples

data(toyped)
x = linkdat(toyped)
x1 = setModel(x, model=1)
summary(x1)

# The shortcut 'model=1' above is equivalent to 
x2 = setModel(x, chrom='AUTOSOMAL', penetrances=c(0,1,1), dfreq=1e-5)
stopifnot(all.equal(x1, x2))

# X-linked recessive model:
y1 = setModel(x, model=4, dfreq=0.01)
summary(y1)

# Long version of the above:
y2 = setModel(x, chrom='X', penetrances=list(male=c(0,1), female=c(0,0,1)),
              dfreq=0.01)
stopifnot(all.equal(y1, y2))

stopifnot(all.equal(y1, setModel(x, y1$model)))

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.