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

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

as.data.frame.netmetaR Documentation

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 class 'netmeta'
as.data.frame(x, row.names = NULL, optional = FALSE, details = FALSE, ...)

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.

Value

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

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

See Also

netmeta

Examples

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)

## Not run: 
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)

## End(Not run)


netmeta documentation built on June 23, 2024, 9:06 a.m.