log_prior: Evaluate log-prior of calibrated parameters

View source: R/03_calibration_functions.R

log_priorR Documentation

Evaluate log-prior of calibrated parameters

Description

log_prior computes a log-prior value for one (or multiple) parameter set(s) based on their prior distributions.

Usage

log_prior(v_params, 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

v_params

Vector (or matrix) of model parameters.

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 scalar (or vector) with log-prior values.

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
log_prior(v_params = sample.prior(n_samp = 5))

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