Sample gamma model(s) with parameters according to priors
sample_gamma_model.Rd
Sample gamma model(s) with parameters according to priors
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.
Value
When length(number_of_contributors)==1
, a single gamma_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 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
.
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
#> $model
#> [1] "gamma_model"
#>
#> $mixture_proportions
#> [1] 0.4558031 0.5441969
#>
#> $mu
#> [1] 1064.382
#>
#> $cv
#> [1] 0.2620336
#>
#> $degradation_beta
#> [1] 0.8587743 0.8587743
#>
#> $LSAE
#> D3S1358 vWA D16S539 CSF1PO TPOX AMEL D8S1179 D21S11
#> 1 1 1 1 1 1 1 1
#> D18S51 D2S441 D19S433 TH01 FGA D22S1045 D5S818 D13S317
#> 1 1 1 1 1 1 1 1
#> D7S820 SE33 D10S1248 D1S1656 D12S391 D2S1338
#> 1 1 1 1 1 1
#>