### Example requires the pedmut package ###
if (requireNamespace("pedmut", quietly = TRUE)){
# A pedigree with data from a single marker
x = nuclearPed(1) |>
addMarker(geno = c("a/a", NA, "b/b")) # mutation!
# Set `equal` model
y = setMutationModel(x, marker = 1, model = "equal", rate = 0.01)
# Inspect model
mutmod(y, 1)
# Likelihood
likelihood(y, 1)
# Remove mutation model
z = setMutationModel(y, model = NULL)
stopifnot(identical(z, x))
}
Run the code above in your browser using DataLab