Basic modelling

Functions for constructing models, via the fitmodel object.

fitmodel()

Constructor of fitmodel object

dTrajObs()

Log-likelihood of a trajectory for a deterministic model

rTrajObs()

Generate an observation trajectory for a fitmodel

dLogPosterior()

Posterior distribution for a fitmodel

testFitmodel()

Test a fitmodel

Stochastic modelling

Methods for generating stochastic simulations

simulateModelStochastic()

Simulate forward a stochastic model

simulateModelReplicates()

Simulate several replicate of the model

Data

Epidemiological datasets.

fluTdc1971

Time-series of the 1971 influenza epidemic in Tristan-da-Cunha

MCMC

Functions related to Markov-chain Monte Carlo.

mcmcMh()

Metropolis-Hastings MCMC

burnAndThin()

Burn and thin MCMC chain

computeDic()

Compute the DIC

Particle filtering

Functions for particle filtering.

particleFilter()

Run a particle filter for fitmodel object

margLogLikeSto()

Marginal log-likelihood for a stochastic model

ABC

Functions for Approximate Bayesian Computation.

computeDistanceAbc()

Compute the distance between a model and data for ABC

distanceOscillation()

Distance weighted by number of oscillations

Plotting

Functions for plotting model trajectories and fits.

plotEssBurn()

Plot Effective Sample Size (ESS) against burn-in

plotFit()

Plot fit of model to data

plotHPDregion2D()

2D highest posterior density region

plotPosteriorDensity()

Plot MCMC posterior densities

plotPosteriorFit()

Plot MCMC posterior fit

plotSMC()

Plot result of SMC

plotTrace()

Plot MCMC trace

plotTraj()

Plot model trajectories