makeStatsDesc: Make a Text Description for Heterogeneity Measures

Description Usage Arguments Details Value See Also Examples

Description

The function produces descriptions that are used for reporting heterogeneity information in the hetStat argument of the metaDF2Matrix() function.

Usage

1
makeStatsDesc(statnames, format)

Arguments

statnames

Character vector of names of measures. See Details.

format

Format string specifying customised format.

Details

The names of measure are taken from the 'hetero' vector in the "metaDF" object. Valid heterogeneity measures for 'metabinDF' objects include: Q, p, tau2, H, H.lower, H.upper, I2, I2.lower, I2.upper, Q.CMH.

Value

An object of class 'statdesc' with a list of following components:

format

A format string

statnames

A character vector of names of measures

See Also

makeLabelDesc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(meta)
data(Olkin95)
meta1 <- metabin(event.e, n.e, event.c, n.c, data = Olkin95,
                 subset = c(41,47,51,59), sm = "RR", method = "I")
Data <- meta2DF(meta1)
statdesc <- makeStatDesc(c("I2", "p"), "Hetero: I2 = %f; p = %f")
matrix <- metaDF2Matrix(Data, stat = list(statdesc))
drawMeta(matrix)
## no hetero stats
matrix <- metaDF2Matrix(Data, stat = NULL)
drawMeta(matrix)
## empty line after summary
matrix <- metaDF2Matrix(Data, stat = list(""))
drawMeta(matrix)

pmur002/metaplot documentation built on May 25, 2019, 10:21 a.m.