logLik.rma {metafor} | R Documentation |
The function extracts the (restricted) log likelihood for objects of class "rma"
.
## S3 method for class 'rma': logLik(object, REML=NULL, ...)
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. |
The (restricted) log likelihood of the model evaluated at the estimated coefficient(s).
For a more complete set of fit statistics and information criteria, see fitstats.rma
.
Wolfgang Viechtbauer; wvb@www.wvbauer.com; http://www.wvbauer.com/
fitstats.rma
, rma.uni
, rma.mh
, rma.peto
### 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)