Given MCMC chains of theta parameters and infection histories, returns the MAP infection history

get_best_draw(chain, inf_chain, max_indivs = NULL, max_times = NULL)

Arguments

chain

the MCMC chain for theta parameters

inf_chain

the MCMC chain for infection histories

max_indivs

the maximum number of individuals in the infection history matrix (default is max individual in inf_chain)

max_times

the maximum number of time points in the infection history matrix (default is max time in inf_chain)

Value

a list with a vector of the best parameters and a matrix of the best infection history

See also

Other mcmc_diagnostics: get_best_pars(), get_index_pars()

Examples

if (FALSE) { # \dontrun{
mcmc_chains <- load_theta_chains()
inf_chains <- load_infection_chains()
best_draw <- get_best_draw(mcmc_chains$chain, inf_chains$chain)
} # }