exactLRR | R Documentation |
The ratio Z = LR(M,p)/LR(R,p) is calculated exactly.
exactLRR(
M,
R = NULL,
afreq = NULL,
ped = nuclearPed(1),
ids = c(1, 3),
method = "PM",
adjust = FALSE,
ln = FALSE
)
M |
Mutation matrix |
R |
Mutation matrix with same dimension as M or NULL |
afreq |
A vector with allele frequencies, of the same length as the size of mutmat |
ped |
A |
ids |
A numeric with ID labels of one or more pedigree members. |
method |
Character specifying reversing method. |
adjust |
Logical. |
ln |
Logical. |
If R == NULL
, R
is first made reversible with
PM
option, preserving the expected mutation rate.
Expected ratio and likelihoods
Thore Egeland.
[makeReversible()].
ped = nuclearPed(1)
p = c("1" = 0.2, "2" = 0.8)
M = mutationMatrix("equal", afreq = p, alleles = 1:length(p), rate = 0.01)
R = makeReversible(M, method = "PM", afreq = p)
exactLRR(M, R, ln = FALSE)
## Not run:
p = NorwegianFrequencies[[1]]
M = mutationMatrix("onestep",
alleles = names(p),
rate = 0.001,
afreq = p)
attr(M, "rate") = expectedMutationRate(M, p)
res = exactLRR(M, R = NULL, ln = T)
R = makeReversible(M, afreq = p, method = "MH")
R2 = adjustReversible(M, R, afreq = p)
res2 = exactLRR(M, R = R, p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.