getVolume {BayesianTools} | R Documentation |
Calculate posterior volume
Description
Calculate posterior volume
Usage
getVolume(sampler, prior = F, method = "MVN", ...)
Arguments
sampler |
an object of superclass bayesianOutput or any other class that has the getSample function implemented (e.g. Matrix) |
prior |
schould also prior volume be calculated |
method |
method for volume estimation. Currently, the only option is "MVN" |
... |
additional parameters to pass on to the |
Details
The idea of this function is to provide an estimate of the "posterior volume", i.e. how "broad" the posterior is. One potential application is to the overall reduction of parametric uncertainty between different data types, or between prior and posterior.
Implemented methods for volume estimation:
Option "MVN" - in this option, the volume is calculated as the determinant of the covariance matrix of the prior / posterior sample.
Author(s)
Florian Hartig
Examples
bayesianSetup = createBayesianSetup(
likelihood = generateTestDensityMultiNormal(sigma = "no correlation"),
lower = rep(-10, 3), upper = rep(10, 3))
out <- runMCMC(bayesianSetup = bayesianSetup, sampler = "Metropolis",
settings = list(iterations = 2000, message = FALSE))
getVolume(out, prior = TRUE)
bayesianSetup = createBayesianSetup(
likelihood = generateTestDensityMultiNormal(sigma = "strongcorrelation"),
lower = rep(-10, 3), upper = rep(10, 3))
out <- runMCMC(bayesianSetup = bayesianSetup, sampler = "Metropolis",
settings = list(iterations = 2000, message = FALSE))
getVolume(out, prior = TRUE)
[Package BayesianTools version 0.1.8 Index]