mixML {DNAmixturesLite} | R Documentation |
Maximisation of the likelihood for one or more mixed traces of DNA
Description
IMPORTANT: This is the DNAmixturesLite package, which is intended as a service to enable users to try DNAmixtures without purchasing a commercial licence for Hugin. When at all possible, we strongly recommend the use of DNAmixtures rather than this lite-version. See https://dnamixtures.r-forge.r-project.org/ for details on both packages.
While the lite-version seeks to provide the full functionality of DNAmixtures, note that computations are much less efficient and that there are some differences in available functionality. Be aware that the present documentation is copied from DNAmixtures and thus may not accurately describe the implementation of this lite-version.
Usage
mixML(
mixture,
pars,
constraints = NULL,
phi.eq = FALSE,
val = NULL,
trace = FALSE,
order.unknowns = TRUE,
...
)
Arguments
mixture |
A |
pars |
A |
constraints |
Equality constraint function as function of an array of parameters. |
phi.eq |
Should the mixture proportions be the same for all traces? Defaults to FALSE. |
val |
Vector of values to be satisfied for the equality constraints. |
trace |
Print the evaluations of the likelihood-function during optimisation? |
order.unknowns |
Should unknown contributors be ordered according to decreasing contributions? Defaults to TRUE. |
... |
Further arguments to be passed on to |
Details
The pre-specified constraints for the model parameter pars
are for each mixture r
-
0 <= pars[[r, "rho"]] < Inf
-
0 <= pars[[r, "eta"]] < Inf
-
0 <= pars[[r, "xi"]] <= 1
-
0 <= pars[[r, "phi"]][i] <= 1
-
sum(pars[[r, "phi"]]) == 1
. If there are 2 or more unknown contributors, then the mixture proportions for the unknown contributors are ordered decreasingly with the first DNA mixture determining the order.
Further constraints can be specified by the user; for this see examples below.
Value
A list containing
mle |
The (suggested) MLE. |
lik |
The log of the likelihood (log e). |
as well as the output from the optimisation.
Author(s)
Therese Graversen
See Also
Examples
data(MC15, USCaucasian)
mix <- DNAmixture(list(MC15), C = list(50), k = 3, K = c("K1", "K2", "K3"), database = USCaucasian)
startpar <- mixpar(rho = list(24), eta = list(37), xi = list(0.08),
phi = list(c(K3 = 0.15, K1 = 0.8, K2 = 0.05)))
ml <- mixML(mix, startpar)
ml$mle
data(MC15, USCaucasian)
mix <- DNAmixture(list(MC15), C = list(50), k = 3, K = "K1", database = USCaucasian)
startpar <- mixpar(rho = list(24), eta = list(37), xi = list(0.08),
phi = list(c(U1 = 0.05, K1 = 0.8, U2 = 0.15)))
ml <- mixML(mix, startpar)
ml$mle
## The following advanced example has a model with two DNA samples
## and various parameter restrictions.
## Be aware that the computation is rather demanding and takes
## a long time to run with this lite-version of DNAmixtures.
## With DNAmixtures (based on HUGIN), it takes only about one minute.
data(MC15, MC18, USCaucasian)
mix <- DNAmixture(list(MC15, MC18), C = list(50, 38), k = 3, K = "K1", database = USCaucasian)
startpar <- mixpar(rho = list(24, 25), eta = list(37, 40), xi = list(0.08, 0.1),
phi = list(c(U1 = 0.05, K1 = 0.7, U2 = 0.25),
c(K1 = 0.7, U2 = 0.1, U1 = 0.2)))
eqxis <- function(x){ diff(unlist(x[,"xi"])) }
## Note that for these two traces, we do not expect phi to be equal.
## Here we set stutter equal for all traces
ml.diff <- mixML(mix, startpar, eqxis, val = 0, phi.eq = FALSE)
## Equal mixture proportions across traces
ml.eqphi <- mixML(mix, startpar, eqxis, val = 0, phi.eq = TRUE)
## Likelihood ratio test for equal mixture proportions
pchisq(-2*(ml.eqphi$lik - ml.diff$lik), df = 1, lower.tail = FALSE)