sample_log_normal_model: Sample log normal model(s) with parameters according to...

View source: R/sample_log_normal_model.R

sample_log_normal_modelR Documentation

Sample log normal model(s) with parameters according to priors

Description

Sample log normal model(s) with parameters according to priors

Usage

sample_log_normal_model(
  number_of_contributors,
  sampling_parameters,
  model_settings
)

Arguments

number_of_contributors

Integer

sampling_parameters

List. Needs to contain:

  • min_template. Numeric of length one.

  • max_template. Numeric of length one.

  • degradation_shape. Numeric of length one.

  • degradation_scale. Numeric of length one.

model_settings

List. See log_normal_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 log normal model with parameters according to prior distributions. The template parameter for each contributor is sampled uniformly between min_template and max_template. The degradation parameter for each contributor is sampled from a gamma distribution with parameters degradation_shape and degradation_scale.

Value

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

Examples

gf <- gf_configuration()

sampling_parameters <- list(min_template = 50., max_template = 1000.,
                            degradation_shape = 2.5, degradation_scale = 1e-3)

model_no_stutter <- sample_log_normal_model(number_of_contributors = 1,
                                            sampling_parameters = sampling_parameters,
                                            model_settings = gf$log_normal_settings)

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