log_normal_model {simDNAmixtures}R Documentation

Defines a log normal model for peak height variability

Description

Defines a log normal model for peak height variability

Usage

log_normal_model(
  template,
  degradation = rep(0, length(template)),
  LSAE = stats::setNames(rep(1, length(model_settings$locus_names)),
    model_settings$locus_names),
  c2,
  k2,
  model_settings
)

Arguments

template

Numeric vector

degradation

Numeric vector of same length as template. Degradation parameters for each contributor.

LSAE

Numeric vector (named) with Locus Specific Amplification Efficiencies. See sample_LSAE. Defaults to 1 for each locus.

c2

Numeric. Allele variance parameter.

k2

Optionally a numeric vector with stutter variance parameters. See sample_log_normal_stutter_variance.

model_settings

List. Possible parameters:

  • locus_names. Character vector.

  • degradation_parameter_cap. Numeric.

  • c2_prior. Numeric of length two with shape and scale.

  • LSAE_variance_prior. Numeric of length one.

  • detection_threshold. Numeric vector (named) with Detection Thresholds. Defaults to 50 for each locus.

  • size_regression. Function, see read_size_regression.

  • stutter_model. Optionally a stutter_model object that gives expected stutter heights. See global_stutter_model.

  • stutter_variability. Optionally peak height variability parameters for stutters. Required when stutter_model is supplied.

Details

Define a log normal model for peak height variability with the parametrisation as described by Bright et al. The model may then be used to sample DNA profiles using the sample_mixture_from_genotypes function. Alternatively, to sample many models and profiles in one go with parameters according to a specified distribution, the sample_mixtures function can be used.

Value

Object of class pg_model.

References

Bright, J.A. et al. (2016). Developmental validation of STRmix™, expert software for the interpretation of forensic DNA profiles. Forensic Science International: Genetics, 23, 226-239. doi: 10.1016/j.fsigen.2016.05.007

See Also

gamma_model.

Examples

data(gf)
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc.csv",
                           package = "simDNAmixtures"))

k2 <- sample_log_normal_stutter_variance(gf$log_normal_settings$stutter_variability)

model <- log_normal_model(template = 1e3, c2 = 15, k2 = k2,
                          model_settings = gf$log_normal_settings)
model

[Package simDNAmixtures version 1.0.1 Index]