View source: R/lr_distribution.R
| lr_distribution | R Documentation |
Builds the exact distribution of the total \log_{10}\mathrm{LR}
for a profile of independent markers. Each marker's per-marker LR
distribution is computed from its joint H1 / H2 table, and the
distributions are convolved (conditional independence: the total
\log_{10}\mathrm{LR} is the sum of the per-marker
\log_{10}\mathrm{LR}s). The result is an as_lr_dist() object,
so summary.lr_dist(), plot.lr_dist() and quantile.lr_dist()
apply directly.
lr_distribution(
models,
poi = NULL,
method = c("exact", "grid"),
grid_points = 512L
)
models |
A |
poi |
Optional character scalar naming the person of interest,
applied to every model. When |
method |
Composition method. |
grid_points |
Integer number of lattice points used when
|
Markers are assumed conditionally independent given the hypothesis
(no linkage); linked-marker composition arrives with the F5 linkage
work. +Inf / -Inf atoms (which arise under mutation = "none"
when a hypothesis assigns zero mass to a state the other supports)
propagate through the exact convolution and are reported by
summary.lr_dist(); method = "grid" rejects infinite support.
An object of class lr_dist (a data.frame with columns
log10_lr, p_h1, p_h2), with attributes "markers" (the
marker identifiers in input order), "n_markers", "method" and
"poi" (the resolved POI; a vector if it differs across models).
marker_model(), as_lr_dist(), summary.lr_dist(),
plot.lr_dist(), quantile.lr_dist(), per_marker_kl_profile().
if (requireNamespace("pedtools", quietly = TRUE)) {
ped <- pedtools::nuclearPed(1)
models <- list(
D3 = marker_model(ped, "D3", c("15" = 0.4, "16" = 0.6),
mutation = list(model = "equal", rate = 1e-3)),
vWA = marker_model(ped, "vWA", c("a" = 0.2, "b" = 0.3, "c" = 0.5),
mutation = list(model = "equal", rate = 1e-3))
)
d <- lr_distribution(models)
summary(d)
quantile(d)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.