tau_CI: Return confidence interval for tau for a meta-analysis

Description Usage Arguments Examples

View source: R/functions.R

Description

Returns confidence interval lower and upper limits for tau (the estimated standard deviation of the true effects) for a meta-analysis fit in metafor::rma.

Usage

1
tau_CI(meta, CI.level = 0.95)

Arguments

meta

A meta-analysis object fit in metafor::rma.

CI.level

Confidence interval level as a proportion (e.g., 0.95)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# calculate effect sizes for example dataset
d = metafor::escalc(measure="RR", ai=tpos, bi=tneg,
                   ci=cpos, di=cneg, data=metafor::dat.bcg)

# fit random-effects model
# note that metafor package returns on the log scale
m = metafor::rma.uni(yi= d$yi, vi=d$vi, knha=TRUE,
measure="RR", method="REML" )

tau_CI(m)

# for nicer formatting
format_CI( tau_CI(m)[1], tau_CI(m)[2] )

MetaUtility documentation built on Oct. 12, 2019, 9:05 a.m.