View source: R/drjacoby_utils.R
sample_drjacoby | R Documentation |
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
sample_drjacoby( pmcmc_results, burnin = 0, n_chains, log_likelihood = calc_loglikelihood, n_trajectories = 10, n_particles = 100, forecast_days = 0 )
pmcmc_results |
output of |
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 |
Sample from a drjacoby mcmc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.