Calculates Bayesian credible (confidence) and predictive intervals based on parameter sample
getPredictiveIntervals(
parMatrix,
model,
numSamples = 1000,
quantiles = c(0.025, 0.975),
error = NULL
)
matrix of parameter values
model / function to calculate predictions. Outcome should be a vector
number of samples to be drawn
quantiles to calculate
function with signature f(mean, par) that generates error expectations from mean model predictions. Par is a vector from the matrix with the parameter samples (full length). f needs to know which of these parameters are parameters of the error function. If supplied, will calculate also predictive intervals additional to credible intervals
Florian Hartig
If numSamples is greater than the number of rows in parMatrix, or NULL, or FALSE, or less than 1 all samples in parMatrix will be used.
getPredictiveDistribution
getCredibleIntervals