setCPT.O {DNAmixturesLite}R Documentation

Set tables for auxiliary variables O.

Description

Function for setting the tables on all nodes O_r_a for mixture r in the network corresponding to one marker, using peak heights and a set of parameters. The returned evidence can be used for conditioning on observed peak heights.

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

setCPT.O(
  domain,
  rho,
  xi,
  eta,
  phi,
  heights,
  C,
  n.unknown,
  n_K,
  O,
  gets_stutter,
  can_stutter,
  stutter.from
)

Arguments

domain

A hugin.domain modelling one marker

rho

rho

xi

xi

eta

eta

phi

phi

heights

Peak heights

C

Detection threshold

n.unknown

Number of unknown contributors

n_K

Allelecounts for known contributors

O

Vector of names for binary nodes

gets_stutter

Does the allele receive stutter? A boolean vector.

can_stutter

Can the allele stutter?

stutter.from

From which allele does the stutter come?

Details

The function sets probabilities in CPT according to whether a peak is observed or not. If a peak is seen at allele a, the conditional distribution is defined using the p.d.f. g for the gamma distribution presented in DNAmixtures as

P(\texttt{O[a]} = \texttt{TRUE} | n_{ia}, n_{i,a+1}, i = 1,\ldots, k) = g(\texttt{heights[a]})/k_a

and likelihood-evidence (0, k_a) for the states (FALSE, TRUE) is returned. If the allele is not seen, the CPT is set using the c.d.f. G for the gamma distribution as

P(\code{O[a]} = \code{FALSE} | n_{ia}, n_{i,a+1}, i = 1,\ldots, k) = G(\code{C}),

in which case likelihood-evidence (1,0) is returned for this allele.

Value

A matrix with each column containing the evidence to be set on O[a] when conditioning on the peak heights.

Technical comments

For the sake of speed and saving memory, only probabilities for the CPT of O[a] are calculated, and not the entire table. The parent nodes are n_i_a and possibly n_i_(a+1) for all unknown contributors i; the n_{ia} for known contributors are specified through the argument n_K. The layout of the table relies in particular on the fact that all nodes have a statespace 0,1,2, which this is *not* checked anywhere. Thus, if other types of allele-count-nodes n_i_a are introduced (such as could be relevant for Amelogenin), the function should be changed accordingly.

If invalid tables are set then any subsequent propagation will fail. No roll-back functionality has so far been implemented to fix this, and the easiest solution is to re-fit the mixture model.

Note that the detection threshold and model parameters can be specified as vectors, and so it is in theory possible to use allele-specific values, if desired. This also holds for the functions setCPT.D and setCPT.Q.


[Package DNAmixturesLite version 0.0-1 Index]