create_posterior: Simplify posterior call

Description Usage Arguments Value

View source: R/posteriors.R

Description

Simplifies the call to the posterior function using closures. This function is set up to work with the lazymcmc package, found at github.com/jameshay218/lazymcmc

Usage

1
create_posterior(parTab, data, PRIOR_FUNC, ...)

Arguments

parTab

the parameter table. See exampleParTab

data

the microcephaly data. See exampleMicroDat

PRIOR_FUNC

pointer to a function to calculate prior values. Can take "pars" and "..." as arguments, where "pars" is the model parameters.

incDat

should also include incidence data, though this can be left as NULL. See exampleIncDat.

peakTimes

include data on epidemic peak time ranges. Can be left as NULL. See examplePeakTimes

ts

time vector over which to solve the ODE model

version

usually just leave this as "binomial", indicating assumed binomially distributed errors. I've added a "forecast" version which expects parameters to do with the lack of second wave.

Value

a single value for the posterior


jameshay218/zikaProj documentation built on Jan. 9, 2020, 7:26 p.m.