| marker_model | R Documentation |
Constructor for a single-marker forensic genetic model. Bundles the
pedigree, the marker identifier, the population allele frequencies, the
mutation model, and (optionally) a linkage descriptor. The resulting
object is the unit consumed by the per-marker engines (per_marker_kl,
per_marker_lr_dist) that arrive in later milestones.
This is the public entry point for the F1 reference engine. The constructor only validates and stores its inputs; the actual joint CPT construction is done downstream.
marker_model(
ped,
marker_id,
freqs,
mutation = list(model = "none", rate = 0),
linkage = NULL,
tol = 1e-06
)
ped |
A |
marker_id |
Character scalar. Identifier used to label the marker
(e.g. |
freqs |
Named numeric vector of population allele frequencies. Names
are allele labels, values must lie in |
mutation |
List describing the mutation model. Required field
|
linkage |
Either |
tol |
Numeric tolerance used when checking that |
An object of class "marker_model" carrying the validated
inputs as components ped, marker_id, freqs, mutation,
linkage, and alleles (names(freqs)).
if (requireNamespace("pedtools", quietly = TRUE)) {
ped <- pedtools::nuclearPed(1)
freqs <- c("12" = 0.2, "13" = 0.3, "14" = 0.5)
mm <- marker_model(
ped = ped,
marker_id = "M1",
freqs = freqs,
mutation = list(model = "equal", rate = 1e-3)
)
print(mm)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.