| hatvalues.rma.uni {metafor} | R Documentation |
The function extracts the diagonal elements of the hat matrix for objects of class "rma.uni".
## S3 method for class 'rma.uni': hatvalues(model, ...)
model |
an object of class "rma.uni". |
... |
other arguments. |
A vector with the diagonal elements of the hat matrix.
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 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")
hatvalues(res)