Learn R Programming

RoBMA (version 4.0.0)

logLik.brma: Extract Log-Likelihood Matrix from brma Object

Description

Extract the pointwise log-likelihood matrix from a brma model object. This is an S x K or S x G matrix where S is the number of posterior samples, K is the number of estimates, and G is the number of clusters. This method implements the S3 \'logLik\' generic for brma objects and returns the matrix of pointwise log-likelihoods (one column per observation, one row per sample).

Usage

# S3 method for brma
logLik(object, unit = "estimate", ...)

Value

An S x K or S x G matrix of log-likelihood values.

Arguments

object

a brma model object.

unit

output unit. See add_loo.

...

currently unused.

Details

The log-likelihood is computed for each observation at each posterior sample. For binomial and Poisson models, each observation consists of a pair of counts (ai/ci or x1i/x2i) that together define a single effect size estimate.

See Also

loo.brma