Learn R Programming

mmeta (version 3.0.1)

MultipleTables.create: Create an object of class MultipleTables.

Description

Create an object of class MultipleTables, which is a components list of exact posterior inference based on multiple 2x2 tables.

Usage

MultipleTables.create(data = NULL, measure = NULL, model = NULL)

Value

An object is returned, inheriting from class MultipleTables. Objects of this class contain the meta-data for generic functions: MultipleTables.modelFit,

MultipleTables.summary, and MultipleTables.plot. The following valuesof the object must be non-null under MultipleTables.create.

measure

the value of measure argument.

model

the value of model argument.

data

a data matrix with rows being y1, n1, y2, and n2.

Arguments

data

a data frame that contains y1, n1, y2, n2 of multiple tables.

measure

a character string specifying a measure. Options are OR, RR, and RD. OR is odds ratio, RR is relative risk, and RD is risk difference.

model

a character string specifying the model. Options are Independent and Sarmanov. Independent is independent beta-binomial model. Sarmanovis Sarmanov beta-binomial model.

See Also

MultipleTables.modelFit, MultipleTables.summary, and MultipleTables.plot.

Examples

Run this code
# \donttest{
 library(mmeta)
 library(ggplot2)
 ## Analyze the dataset colorectal to conduct exact inference of the odds ratios
 data(colorectal)
 colorectal['study_name'] <- colorectal['studynames']
 multiple_tables_obj <- MultipleTables.create(data=colorectal, measure='OR', model= 'Sarmanov')
 # }

Run the code above in your browser using DataLab