Learn R Programming

RoBMA (version 4.0.0)

logml.brma: Log Marginal Likelihood for brma Objects

Description

Extract the log marginal likelihood from a brma model. The marginal likelihood must first be computed using add_marglik.

Usage

# S3 method for brma
logml(x, ...)

Value

A scalar numeric value representing the log marginal likelihood.

Arguments

x

a brma model object.

...

additional arguments (currently not used).

Details

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.

See Also

add_marglik, bridge_sampler.brma, bf.brma, post_prob.brma

Examples

Run this code
if (FALSE) {
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)
}
}

Run the code above in your browser using DataLab