Description Usage Arguments Value Author(s)
Take random samples from the posterior
1 2 3 4 | sample.posterior(sample.prior, eval.prior, gen.init, data, test.init = NULL,
fixed.parameters = list(), likelihood.arguments = list(),
mcmc.arguments = list(), time.column = "time", tmax = NULL,
thickening = 1, interpolate = T, nSamples = 1, update.init = F)
|
sample.prior |
a function to sample from prior |
eval.prior |
a function to evaluate the prior |
gen.init |
a function to generate the initial conditions |
data |
the data to compare the model to |
test.init |
initial conditions (proportoin susceptible in each each group) |
fixed.parameters |
(list of) fixed parameters of the model |
likelihood.arguments |
(list of) parameters to be passed to age.likelihood |
mcmc.arguments |
(list of) parameters to be passed to mcmcMH |
time.column |
the name of the time column in the data |
tmax |
maximum time to run the simulations for |
thickening |
thickening innterval |
interpolate |
whether to intepolate births/deaths etc |
nSamples |
number of samples (if this is 1, the sample will be from the prior) |
update.init |
whether to update the initial conditions |
return.traj |
whether to return the whol trajectory |
prior, likelihood, posterior, parameters, initial values
Sebastian Funk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.