as.data.frame.meta: Additional functions for objects of class meta

Description Usage Arguments Value Author(s) See Also Examples

View source: R/as.data.frame.meta.R

Description

The as.data.frame method returns a data frame containing information on individual studies, e.g., estimated treatment effect and its standard error.

Usage

1
2
## S3 method for class 'meta'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

An object of class meta.

row.names

NULL or a character vector giving the row names for the data frame.

optional

logical. If TRUE, setting row names and converting column names (to syntactic names) is optional.

...

other arguments

Value

A data frame is returned by the function as.data.frame.

Author(s)

Guido Schwarzer sc@imbi.uni-freiburg.de

See Also

metabin, metacont, metagen, forest.meta

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
data(Fleiss1993cont)
#
# Generate additional variable with grouping information
#
Fleiss1993cont$group <- c(1, 2, 1, 1, 2)
#
# Do meta-analysis without grouping information
#
m1 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
               data = Fleiss1993cont, sm = "SMD",
               studlab = paste(study, year))
#
# Update meta-analysis object and do subgroup analyses
#
summary(update(m1, byvar = group))

# Same result using metacont function directly
#
m2 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
               data = Fleiss1993cont, sm = "SMD",
               studlab = paste(study, year), byvar = group)
summary(m2)

# Compare printout of the following two commands
#
as.data.frame(m1)
m1$data

meta documentation built on Sept. 14, 2021, 5:14 p.m.