View source: R/bridgesampling.R
| logml.brma | R Documentation |
Extract the log marginal likelihood from a brma model.
The marginal likelihood must first be computed using add_marglik.
## S3 method for class 'brma'
logml(x, ...)
x |
a brma model object. |
... |
additional arguments (currently not used). |
This function extracts the log marginal likelihood from the bridge sampling
object that was previously computed and stored using add_marglik.
Product-space model-averaging objects (BMA.norm, BMA.glmm,
and RoBMA) do not expose bridge-sampling marginal likelihoods.
A scalar numeric value representing the log marginal likelihood.
add_marglik, bridge_sampler.brma,
bf.brma, post_prob.brma
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit <- brma(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
fit <- add_marglik(fit)
logml(fit)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.