calculate_posteriors: Calculate posterior densities

View source: R/bayesian_helpers.R

calculate_posteriorsR Documentation

Calculate posterior densities

Description

Calculate posterior densities

Usage

calculate_posteriors(
  .samples,
  .func = .func_,
  .args = .args_,
  .l_targets = .l_targets_,
  .l_params = .l_params_,
  .transform = FALSE
)

Arguments

.samples

A table or vector of sampled parameter values

.func

A function defining the model to be calibrated

.args

A list of arguments to be passed to .func

.l_targets

A list containing a vector of targets' names, a vector of targets' weights, a vector of targets' distributions, and a table for each target that contains the values (column name 'value') and standard errors (column name 'sd') of the corresponding target.

.l_params

A list that contains a vector of parameter names, distributions and distributions' arguments.

.transform

Logical for whether to back-transform parameters to their original scale.


W-Mohammed/calibrater documentation built on Oct. 14, 2023, 1:57 a.m.