Sample log normal model(s) with parameters according to priors
sample_log_normal_model.Rd
Sample log normal model(s) with parameters according to priors
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.
Value
When length(number_of_contributors)==1
, a single log_normal_model of class pg_model
. Otherwise, a list of these.
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
.
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)