Learn R Programming

metafor (version 0.5-0)

hatvalues.rma.uni: 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.

See Also

rma.uni, influence.rma.uni

Examples

Run this code
### load BCG vaccine data
data(dat.bcg)

### meta-analysis of the log risk rates 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)

Run the code above in your browser using DataLab