netmeta (version 2.9-0)

as.data.frame.netmeta: Create a data frame from an object of class netmeta

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

# S3 method for netmeta
as.data.frame(x, row.names = NULL, optional = FALSE, details = FALSE, ...)

Value

A data frame is returned by the function

as.data.frame.

Arguments

x

An object of class netmeta.

row.names

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

optional

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

details

A logical. If TRUE, additional variables of less interest are included in data frame.

...

Additional arguments.

See Also

netmeta

Examples

Run this code
data(smokingcessation)

# Transform data from arm-based format to contrast-based format
#
p1 <- pairwise(list(treat1, treat2, treat3),
  event = list(event1, event2, event3), n = list(n1, n2, n3),
  data = smokingcessation, sm = "OR")

# Conduct random effects network meta-analysis and show data frame
#
net1 <- netmeta(p1, common = FALSE)
as.data.frame(net1)

if (FALSE) {
data(Senn2013)

# Conduct network meta-analysis
#
net2 <- netmeta(TE, seTE, treat1, treat2, studlab,
  data = Senn2013, sm = "MD")

as.data.frame(net2)
as.data.frame(net2, details = TRUE)
}

Run the code above in your browser using DataLab