likelihood(x, ...)
## S3 method for class 'linkdat':
likelihood(x, locus1, locus2=NULL, theta=NULL,
startdata=NULL, eliminate=0, logbase=NULL, ...)
## S3 method for class 'singleton':
likelihood(x, locus1, logbase=NULL, ...)
## S3 method for class 'list':
likelihood(x, locus1, ...)
likelihoodSNP(x, marker, theta=NULL, afreq=NULL, logbase=NULL, TR.MATR=NULL,
singleNum.geno=NULL)
linkdat
object, a singleton
object, or a list of such objects. In likelihoodSNP
,
x
must be a linkdat
object, with x$model
different from NULL.marker
object compatible with x
. If x
is a list, then locus1
must be a list of corresponding
marker
objects.marker
object compatible with x
. See Details.likelihoodSNP
: between the marker and the disease locus).
To make biological sense theta should be between 0 and 0.5.partialmarker
is non-empty and the number of alleles is large.logbase
as basis for the logarithm.x$nMark
, indicating which marker to use in the calculation.marker
argument is ignored.logbase
is numeric, the output is log(likelihood, logbase)
.locus2 = NULL
, the result is the likelihood of the genotypes observed at the marker in locus1.
If locus2 = "disease"
, the result is the likelihood of the marker genotypes in locus1, given the affection statuses of the pedigree members, the disease model and the recombination rate theta
between the marker and disease loci.
(This computation is central in parametric linkage analysis.)
If locus2
is a marker object, the result is the likelihood of the genotypes at the two markers, given the recombination rate theta between them.
The function likelihoodSNP
is a fast version of likelihood.linkdat
in the case where locus2 = "disease"
and the marker in locus1 is diallelic.lod
data(toyped)
x = linkdat(toyped, model=1) #dominant model
lod1 = likelihoodSNP(x, marker=1, theta=0, logbase=10) -
likelihoodSNP(x, marker=1, theta=0.5, logbase=10)
lod2 = lod(x, markers=1, theta=0)
# should be the same:
stopifnot(identical(lod1, as.numeric(lod2)), round(lod1, 2)==0.3)
Run the code above in your browser using DataLab