An example command to generate samples from
my_rLogPosteriorEpi1
using my_mcmcMh
is:
trace <- my_mcmcMh(
target = my_dLogPosteriorR0Epi1, # target distribution
initTheta = 1, # intial parameter guess
proposalSd = 0.1, # standard deviation of
# Gaussian proposal: 0.1
nIterations = 1000
) # number of iterations
You can copy and paste this command into your R session, and proceed from there.
Return to the MCMC session.
This web site and the material contained in it were originally created in support of an annual short course on Model Fitting and Inference for Infectious Disease Dynamics at the London School of Hygiene & Tropical Medicine. All material is under a MIT license. Please report any issues or suggestions for improvement on the corresponding GitHub issue tracker. We are always keen to hear about any uses of the material here, so please do get in touch using the Discussion board if you have any questions or ideas, or if you find the material here useful or use it in your own teaching.