getVolume | R Documentation |
Calculate posterior volume
getVolume(sampler, prior = F, method = "MVN", ...)
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 |
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.
Florian Hartig
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.