| error_measures {bridgesampling} | R Documentation |
Error Measures for Estimated Marginal Likelihood
Description
Computes error measures for estimated marginal likelihood.
Usage
error_measures(bridge_object, ...)
## S3 method for class 'bridge'
error_measures(bridge_object, ...)
## S3 method for class 'bridge_list'
error_measures(bridge_object, na.rm = TRUE, ...)
Arguments
bridge_object |
an object of class |
... |
additional arguments (currently ignored). |
na.rm |
a logical indicating whether missing values in logml estimates should be removed. Ignored for the |
Details
Computes error measures for marginal likelihood bridge sampling estimates. The approximate errors for a bridge_object of class "bridge" that has been obtained with method = "normal" and repetitions = 1 are based on Fruehwirth-Schnatter (2004).
Not applicable in case the object of class "bridge" has been obtained with method = "warp3" and repetitions = 1.
To assess the uncertainty of the estimate in this case, it is recommended to run the "warp3" procedure multiple times.
Value
If bridge_object is of class "bridge" and has been obtained with method = "normal" and repetitions = 1, returns a list with components:
-
re2: approximate relative mean-squared error for marginal likelihood estimate. -
cv: approximate coefficient of variation for marginal likelihood estimate (assumes that bridge estimate is unbiased). -
percentage: approximate percentage error of marginal likelihood estimate.
If bridge_object is of class "bridge_list", returns a list with components:
-
min: minimum of the log marginal likelihood estimates. -
max: maximum of the log marginal likelihood estimates. -
IQR: interquartile range of the log marginal likelihood estimates.
Note
For examples, see bridge_sampler and the accompanying vignettes:
vignette("bridgesampling_example_jags")
vignette("bridgesampling_example_stan")
Author(s)
Quentin F. Gronau
References
Fruehwirth-Schnatter, S. (2004). Estimating marginal likelihoods for mixture and Markov switching models using bridge sampling techniques. The Econometrics Journal, 7, 143-167. doi: 10.1111/j.1368-423X.2004.00125.x
See Also
The summary methods for bridge and bridge_list objects automatically invoke this function, see bridge-methods.