MultipleTables.create: Create an object of class 'MultipleTables'.

View source: R/MultipleTables-method-exported.R

MultipleTables.createR Documentation

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)

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.

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.

See Also

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

Examples


 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')
 

mmeta documentation built on Feb. 16, 2023, 8:39 p.m.