getPredictiveIntervals {BayesianTools}R Documentation

Calculates Bayesian credible (confidence) and predictive intervals based on parameter sample

Description

Calculates Bayesian credible (confidence) and predictive intervals based on parameter sample

Usage

getPredictiveIntervals(parMatrix, model, numSamples = 1000,
  quantiles = c(0.025, 0.975), error = NULL)

Arguments

parMatrix

matrix of parameter values

model

model / function to calculate predictions. Outcome should be a vector

numSamples

number of samples to be drawn

quantiles

quantiles to calculate

error

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

Details

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.

Author(s)

Florian Hartig

See Also

getPredictiveDistribution
getCredibleIntervals


[Package BayesianTools version 0.1.7 Index]