sample_gamma_model: Sample gamma model(s) with parameters according to priors

View source: R/sample_gamma_model.R

sample_gamma_modelR Documentation

Sample gamma model(s) with parameters according to priors

Description

Sample gamma model(s) with parameters according to priors

Usage

sample_gamma_model(number_of_contributors, sampling_parameters, model_settings)

Arguments

number_of_contributors

Integer

sampling_parameters

List. Needs to contain:

  • min_mu. Numeric of length one.

  • max_mu. Numeric of length one.

  • min_cv. Numeric of length one.

  • max_cv. Numeric of length one.

  • degradation_shape1. Numeric of length one.

  • degradation_shape2. Numeric of length one.

model_settings

List. See gamma_model.

Details

In simulation studies involving many mixed DNA profiles, one often needs to generate various samples with different model parameters. This function samples a gamma model with parameters according to prior distributions. The mean peak height parameter mu is sampled uniformly between min_mu and max_mu. Likewise, the variability parameter cv is sampled uniformly between min_cv and max_cv. The degradation slope parameter beta is sampled according to a Beta distribution with parameters degradation_shape1 and degradation_shape2.

Value

When length(number_of_contributors)==1, a single gamma_model of class pg_model. Otherwise, a list of these.

Examples

gf <- gf_configuration()

sampling_parameters <- list(min_mu = 50., max_mu = 5e3,
                           min_cv = 0.05, max_cv = 0.35,
                           degradation_shape1 = 10, degradation_shape2 = 1)

model_no_stutter <- sample_gamma_model(number_of_contributors = 2,
                                      sampling_parameters = sampling_parameters,
                                      model_settings = gf$gamma_settings_no_stutter)

model_no_stutter$parameters


simDNAmixtures documentation built on April 15, 2025, 1:11 a.m.