logLik.rma {metafor}R Documentation

Log-Likelihood of rma Objects

Description

The function extracts the (restricted) log likelihood for objects of class "rma".

Usage

## S3 method for class 'rma':
logLik(object, REML=NULL, ...)

Arguments

object an object of class "rma".
REML logical indicating whether the regular or restricted log likelihood should be returned. When NULL (default), the regular log likelihood is returned, unless restricted maximum likelihood estimation was used to fit the model.
... other arguments.

Value

The (restricted) log likelihood of the model evaluated at the estimated coefficient(s).

Note

For a more complete set of fit statistics and information criteria, see fitstats.rma.

Author(s)

Wolfgang Viechtbauer; wvb@www.wvbauer.com; http://www.wvbauer.com/

See Also

fitstats.rma, rma.uni, rma.mh, rma.peto

Examples

### load BCG vaccine data
data(dat.bcg)

### meta-analysis of the log risk ratios using a mixed-effects model
### with two moderators (absolute latitude and publication year)
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, mods=cbind(ablat, year),
           data=dat.bcg, measure="RR", method="REML")
logLik(res)

[Package metafor version 0.5-5 Index]