sample.prior: Sample from prior distributions of calibrated parameters

View source: R/03_calibration_functions.R

sample.priorR Documentation

Sample from prior distributions of calibrated parameters

Description

sample.prior generates a sample of parameter sets from their prior distribution.

Usage

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 upper bounds for each parameter.

v_ub

Vector with lower bounds for each parameter.

Value

A matrix with 3 rows and n_samp rows. Each row corresponds to a parameter set sampled from their prior distributions

Examples

v_param_names  <- c("p_S1S2", "hr_S1", "hr_S2")
n_param        <- length(v_param_names)
v_lb <- c(p_S1S2 = 0.01, hr_S1 = 1.0, hr_S2 = 5)  # lower bound
v_ub <- c(p_S1S2 = 0.50, hr_S1 = 4.5, hr_S2 = 15) # upper bound
sample.prior(2)

DARTH-git/darthpack documentation built on March 10, 2024, 3:31 p.m.