sample.posterior: Take random samples from the posterior

Description Usage Arguments Value Author(s)

Description

Take random samples from the posterior

Usage

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)

Arguments

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

Value

prior, likelihood, posterior, parameters, initial values

Author(s)

Sebastian Funk


sbfnk/dynmod documentation built on May 29, 2019, 3:21 p.m.