Description Usage Arguments Details Value References See Also Examples
This function conducts exact posterior inference based on multiple 2x2 tables.
1 2  multipletables(data=NULL, measure=NULL, model="Sarmanov",
method="sampling", nsam=10000, alpha=0.05)

data 
a data frame that contains 
measure 
a character string specifying a measure. Options are

model 
a character string specifying the model. Options are

method 
a character string specifying the method. Options are

alpha 
a numeric value specifying the significant level. Default value sets to 0.05. 
nsam 
a numeric value specifying the number of samples if method is 
There are two kinds of study design, i.e., prospective study or
clinical trial, and retrospective or casecontrol study. In a
prospective study or clinical trial, data
is a data frame that contains y1
, n1
, y2
, n2
,
studynames
. y1
is the number of subjects
experienced a certain event in the unexposed group. n1
is the number
of subjects in the unexposed group. y2
is the number of subjects experienced
a certain event in the exposed group. n2
is the number of
subjects in the exposed group. In this study, OR
is odds ratio
of event comparing exposed group with unexposed group. RR
is relative risk of event comparing exposed group with unexposed group. RD
is risk
difference of event comparing exposed group with unexposed group.
For casecontrol study, y1
is the number of subjects with
exposure in the control group. n1
is the number of
subjects in the control group. y2
is the number of
subjects with exposure in the case group. n2
is the
number of subjects in the case group. In this study, OR
is odds ratio
of event comparing case group with control group. RR
is
relative risk of event comparing case group with control group. RD
is risk
difference of event comparing case group with control group.
Empirical Bayes method is used to maximize the marginal likelihood
combining all studies to obtained the estimates of the
hyperparameters a1, b1, a2, b2, and rho. When
method="independent"
, only the estimated hyperparameters
of a1, b1, a2, and b2 are used. When model="Sarmanov"
,
rho
is subject to constraints. See Chen et al (2011) for
details.
The output cov.matrix
and hessian
are the estimated
covariance matrix and hessian matrix of the estimated
parameters in the transformed scales. The estimated parameters
are log(a1), log(b1), log(a2), log(b2), omega, where the
correlation coefficient rho is a function of a1, b1, a2, b2, and
omega. Please see details on page 7 of Chen et al (2012 b).
An object is returned, inheriting from class multipletables
.
Objects of this class have methods for the generic functions summary
and plot
.
The following components must be included in a legitimate multipletables
object.
measure 
the value of 
model 
the value of 
method 
the value of 
dataset 
a data matrix with rows being 
studynames 
a character string indicating all the study names 
measurename 
a character string specifying the full names of
value of 
alpha 
the value of 
chi2 
the chisquare test statistics of the likelihood ratio test 
pvalue 
the pvalue of the likelihood ratio test 
MLE 
a numeric vector of the estimated hyperparameters in the
following order: 
cov.matrix 
the estimated covariance matrix of the estimated parameters in the transformed scales 
hessian 
the estimated hessian matrix of the estimated parameters in the transformed scales 
overall 
a list of two components that contain the overall measure (e.g., overall OR) and its 95% equaltail credible interval. 
sample 
a list of length the number of studies with components numerical vectors of the samples of the each studyspecific measure. 
density 
a list of length the number of studies with components lists of density of each studyspecific measure. 
dataset 
a numeric vector of input data with components:

parameter 
a numeric vector specifying the hyperparameters with components

alpha 
a numeric value specifying the significant level. Default value sets to 0.05. 
sample 
a list of samples for the posterior and prior distributions 
density 
a list of the density of the posterior and prior distributions 
studynames 
a character vector being "Posterior" and "Prior". 
Luo, S., Chen, Y., Su, X., Chu, H., (2014). mmeta: An R Package for Multivariate MetaAnalysis. Journal of Statistical Software, 56(11), 126.
Chen, Y., Luo, S., (2011a). A Few Remarks on "Statistical Distribution of the Difference of Two Proportions' by Nadarajah and Kotz, Statistics in Medicine 2007; 26(18):35183523" . Statistics in Medicine, 30(15), 19131915.
Chen, Y., Chu, H., Luo, S., Nie, L., and Chen, S. (2014a). Bayesian analysis on metaanalysis of casecontrol studies accounting for withinstudy correlation. Statistical Methods in Medical Research, doi: 10.1177/0962280211430889. In press.
Chen, Y., Luo, S., Chu, H., Su, X., and Nie, L. (2014b). An empirical Bayes method for multivariate metaanalysis with an application in clinical trials. Communication in Statistics: Theory and Methods. In press.
Chen, Y., Luo, S., Chu, H., Wei, P. (2013). Bayesian inference on risk differences: an application to multivariate metaanalysis of adverse events in clinical trials. Statistics in Biopharmaceutical Research, 5(2), 142155.
plot.multipletables
summary.multipletables
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42  #library(mmeta)
#Analyze the dataset colorectal to conduct exact inference of the odds ratios
#data(colorectal)
#multiple.OR < multipletables(data=colorectal, measure="OR",
# model="Sarmanov", method="exact")
#summary(multiple.OR)
# Generate the forest plot with 95% CIs of studyspecific odds ratios
#and 95% CI of overall odds ratio
#plot(multiple.OR, type="forest", addline=1,file="forestOR")
# Plot the posterior density functions of some target studies in an overlaying manner
#plot(multiple.OR, type="overlap", select=c(4,14,16,20),file="overlapOR")
# Plot the posterior density functions of some target studies in a
#sidebyside manner
#plot(multiple.OR, type="sidebyside", select=c(4,14,16,20), ylim=c(0,2.7),
# xlim=c(0.5,1.5),file="sidebysideOR")
#print(multiple.OR.table)
#print(multiple.OR.table, type="html")
# Analyze the dataset withdrawal to conduct inference of the relative risks
#data(withdrawal)
#multiple.RR < multipletables(data=withdrawal, measure="RR",
# model="Sarmanov")
#summary(multiple.RR)
#plot(multiple.RR, type="forest", addline=1)
#plot(multiple.RR, type="overlap", select=c(3,8,14,16))
#plot(multiple.RR, type="sidebyside", select=c(3,8,14,16),
#ylim=c(0,1.2), xlim=c(0.4,3))
#print(multiple.RR.table)
#print(multiple.RR.table, type="html")
# Analyze the dataset withdrawal to conduct inference of the risk differences
#data(withdrawal)
#multiple.RD < multipletables(data=withdrawal, measure="RD",
# model="Sarmanov")
#summary(multiple.RD)
#plot(multiple.RD, type="forest", addline=0)
#plot(multiple.RD, type="overlap", select=c(3,8,14,16))
#plot(multiple.RD, type="sidebyside", select=c(3,8,14,16))
#plot(multiple.RD, type="sidebyside", select=c(3,8,14,16),
# ylim=c(0,6), xlim=c(0.2,0.4))
#print(multiple.RD.table)
#print(multiple.RD.table, type="html")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.