dviSim {dvir} | R Documentation |
Simulates genotypes for the references and missing persons in each AM family, transfers to the PM singletons according to the indicated matching. Remaining victims are simulated as unrelated.
dviSim(
dvi,
N = 1,
refs = typedMembers(dvi$am),
truth = NULL,
seed = NULL,
conditional = FALSE,
simplify1 = TRUE,
verbose = FALSE
)
dvi |
A |
N |
The number of complete simulations to be performed. |
refs |
A character indicating reference individuals. By default, the
typed members of the input. If |
truth |
A named vector of the format |
seed |
An integer seed for the random number generator. |
conditional |
A logical, by default FALSE. If TRUE, references are kept unchanged, while the missing persons are simulated conditional on these. |
simplify1 |
A logical, by default TRUE, removing the outer list layer when N = 1. See Value. |
verbose |
A logical. |
If N = 1
, a dviData
object similar to the input, but with new
genotypes for the pm samples. If N > 1
, a list of dviData
objects.
# Simulate refs and missing once and plot:
ex = dviSim(example2, N = 1, truth = c(V1 = "M1", V2 = "M2", V3 = "M3"))
plotDVI(ex, marker = 1)
# Two simulations and plot for the first
ex = dviSim(example2, N = 2, truth = c(V1 = "M1", V2 = "M2", V3 = "M3"),
seed = 1729)
plotDVI(ex[[1]], marker = 1)