sample_drjacoby: Sample from a drjacoby mcmc

View source: R/drjacoby_utils.R

sample_drjacobyR Documentation

Sample from a drjacoby mcmc

Description

The drjacoby sample is very similar to [[sample_pmcmc]] but there are a few subtle differences that meant it was easier to have a separate function for using drjacoby for the mcmc process

Usage

sample_drjacoby(
  pmcmc_results,
  burnin = 0,
  n_chains,
  log_likelihood = calc_loglikelihood,
  n_trajectories = 10,
  n_particles = 100,
  forecast_days = 0
)

Arguments

pmcmc_results

output of run_mcmc_chain; The results from the PMCMC run – can have mutliple chains.

burnin

integer; Number of iterations to discard from the start of MCMC run. Default = 0

n_chains

number of chains that considered. Should inherent from pmcmc.

log_likelihood

function to calculate log likelihood, must take named parameter vector as input, allow passing of implicit arguments corresponding to the main function arguments. Returns a named list, with entries: - $log_likelihood, a single numeric - $sample_state, a numeric vector corresponding to the state of a single particle, chosen at random, at the final time point for which we have data. If NULL, calculated using the function calc_loglikelihood.

n_trajectories

interger; Number of trajectories to be returned. Integer. Default = 10.

n_particles

integer; Number of particles to be considered in the particle filter. Default = 100

forecast_days

integer; number of days being forecast. Default = 0

Details

Sample from a drjacoby mcmc


mrc-ide/squire documentation built on Sept. 10, 2022, 1:11 a.m.