fitstats.rma {metafor} | R Documentation |
The function extracts the log likelihood, deviance, AIC, and BIC values from objects of class "rma"
.
## S3 method for class 'rma': fitstats(x, REML=NULL, ...)
x |
an object of class "rma" . |
REML |
logical indicating whether the regular or restricted likelihood function should be used to obtain the fit statistics and information criteria. When NULL (default), the regular likelihood is used, unless restricted maximum likelihood estimation was used to fit the model. |
... |
other arguments. |
A column vector with the log likelihood, deviance, AIC, and BIC values.
When a random/mixed-effects model is fitted, tau^2 is counted as an additional parameter in the calculation of the AIC and BIC.
Wolfgang Viechtbauer; wvb@www.wvbauer.com; http://www.wvbauer.com/
### load BCG vaccine data data(dat.bcg) ### meta-analysis of the log risk ratios using a random-effects model res1 <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, measure="RR", method="ML") ### mixed-effects model with two moderators (latitude and publication year) res2 <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, mods=cbind(ablat, year), data=dat.bcg, measure="RR", method="ML") fitstats(res1) fitstats(res2)