credible.interval.model: Calculate the (equal tailed) credible interval at different...

View source: R/mcmc.R

credible.interval.modelR Documentation

Calculate the (equal tailed) credible interval at different time points

Description

This function is useful to convert the mcmc results into credible intervals, which is needed for plotting your results. Calls aggregateModel to aggregate the results by the passed intervals.

Usage

credible.interval.model(func, batch, intervals = c(0, 0.98), ...)

Arguments

func

The function that gets called for each set of parameters (e.g. infectionODEs)

batch

Posterior parameters samples resulting from mcmc. Each row is a set of parameters

intervals

The intervals to calculate (by default 0 (median) and 0.98)

...

Extra parameters passed to func

Value

Returns a data.frame in long format, with for each time point, interval, column.ID the value


MJomaba/flu-evidence-synthesis documentation built on April 26, 2022, 11:12 p.m.