sampler: RAMSES Sampling Structure

Description Usage Arguments Value

View source: R/update_functions_ramses.R

Description

Function that fits a heirarchical model using MCMC. It requires a list of initial parameter values, a list of needed fixed values, and a list of update functions, all of which are tied together by matching element names.

Usage

1
2
sampler(inits, fixed, updates, niter, nburn,
  parms_to_save = names(inits), progress = FALSE)

Arguments

inits

list of named parameter initial values.

fixed

list of named values that remain fixed in the model.

updates

list of update functions with names matching those in parm_state.

niter, nburn

number of MCMC iterates and burnin.

parms_to_save

character vector indicating which parameters to save. Defaults to all. Use this to allow for auxiliary onjects like matrices.

Value

A matrix where each row is an MCMC iterate and each column is a parameter or part of a parameter vector.


wzhorton/ramses documentation built on May 17, 2019, 1:03 p.m.