hatvalues.rma.uni {metafor}R Documentation

Diagonal Elements of the Hat Matrix for rma.uni Objects

Description

The function extracts the diagonal elements of the hat matrix for objects of class "rma.uni".

Usage

## S3 method for class 'rma.uni':
hatvalues(model, ...)

Arguments

model an object of class "rma.uni".
... other arguments.

Value

A vector with the diagonal elements of the hat matrix.

Author(s)

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

See Also

rma.uni, influence.rma.uni

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")
hatvalues(res)

[Package metafor version 0.5-5 Index]