Learn R Programming

DNAmixturesLite (version 0.0-1)

logL: Loglikelihood function for DNA mixture analysis.

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.

The function logL is used to produce a log likelihood function for one or more traces of DNA. logL calls one of four other likelihood functions according to whether peak heights or only peak presence/absence is used as observations, and also whether there are any unknown contributors in the model.

Usage

logL(mixture, presence.only = FALSE, initialize = TRUE)

logL.UK(mixture, initialize = TRUE)

logL.K(mixture)

logLpres.UK(mixture, initialize = TRUE)

logLpres.K(mixture)

Value

A function, which takes a mixpar model parameter as argument.

Arguments

mixture

A DNAmixture model.

presence.only

Set to TRUE to ignore peak heights and evaluate the likelihood function considering peak presence and absence (heights above and below threshold) only. Defaults to FALSE.

initialize

By default all entered evidence is removed from the networks in object. Setting initialize = FALSE should be done with care, and it is up to the user to ensure that the likelihood being computed is meaningful.

Author

Therese Graversen

Examples

Run this code
data(MC18, USCaucasian)
mixHp <- DNAmixture(list(MC18), k = 3, K = c("K1", "K2", "K3"), C = list(50),
                    database = USCaucasian)
p <- mixpar(rho = list(30), eta = list(34), xi = list(0.08),
            phi = list(c(K1 = 0.71, K3 = 0.1, K2 = 0.19)))
l <- logL(mixHp)
l(p)

Run the code above in your browser using DataLab