setModel {paramlink} | R Documentation |
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 |
model |
NULL, or an object of class 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 If |
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
.
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)))