sample.prior is kept for backwards compatibility and because the IMIS package calls the sampling function by this exact name. It is a thin wrapper around sample_prior, which follows the DARTH naming conventions and should be preferred in new code.

sample.prior(
  n_samp,
  v_param_names = c("p_S1S2", "hr_S1", "hr_S2"),
  v_lb = c(p_S1S2 = 0.01, hr_S1 = 1, hr_S2 = 5),
  v_ub = c(p_S1S2 = 0.5, hr_S1 = 4.5, hr_S2 = 15)
)

Arguments

n_samp

Number of samples.

v_param_names

Vector with parameter names.

v_lb

Vector with lower bounds for each parameter.

v_ub

Vector with upper bounds for each parameter.

Value

A matrix with n_samp rows and one column per calibrated parameter. Each row corresponds to a parameter set sampled from their prior distributions.

See also

Examples

sample.prior(2)
#>          p_S1S2    hr_S1     hr_S2
#> [1,] 0.39686433 1.545373 13.303245
#> [2,] 0.03204099 4.150836  8.621342