| Title: | Meta-Analysis via a Unified Framework of Confidence Distribution |
|---|---|
| Description: | An implementation of an all-in-one function for a wide range of meta-analysis problems. It contains three functions. The gmeta() function unifies all standard meta-analysis methods and also several newly developed ones under a framework of combining confidence distributions (CDs). Specifically, the package can perform classical p-value combination methods (such as methods of Fisher, Stouffer, Tippett, etc.), fit meta-analysis fixed-effect and random-effects models, and synthesizes 2x2 tables. Furthermore, it can perform robust meta-analysis, which provides protection against model-misspecifications, and limits the impact of any unknown outlying studies. In addition, the package implements two exact meta-analysis methods from synthesizing 2x2 tables with rare events (e.g., zero total event). The np.gmeta() function summarizes information obtained from multiple studies and makes inference for study-level parameters with no distributional assumption. Specifically, it can construct confidence intervals for unknown, fixed study-level parameters via confidence distribution. Furthermore, it can perform estimation via asymptotic confidence distribution whether tie or near tie condition exist or not. The plot.gmeta() function to visualize individual and combined CDs through extended forest plots is also available. Compared to version 2.2-6, version 2.3-0 contains a new function np.gmeta(). Compatibility updates by Renova. |
| Authors: | Guang Yang [aut], Jerry Q. Cheng [aut, cre], Minge Xie [aut], Wei Qian [aut] |
| Maintainer: | Jerry Q. Cheng <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.3.1.9001 |
| Built: | 2026-11-15 20:39:04 UTC |
| Source: | https://github.com/renova-r/gmeta |
A unified method for meta-analysis includes combining p-values, fitting meta-analysis fixed-effect and random-effects models, and synthesizing 2x2 tables evidence all under a framework of combining confidence distributions (CDs). The function produces an object of class gmeta with associated functions print, summary, and plot.
gmeta(gmi, gmi.type = c('pivot', 'cd', 'pvalue', '2x2'), method = c('fixed-mle', 'fixed-robust1', 'fixed-robust2', 'fixed-robust2(sqrt12)', 'random-mm', 'random-reml', 'random-tau2', 'random-robust1', 'random-robust2', 'random-robust2(sqrt12)', 'fisher', 'normal', 'stouffer', 'min', 'tippett', 'max', 'sum', 'MH', 'Mantel-Haenszel', 'Peto', 'exact1', 'exact2'), linkfunc = c('inverse-normal-cdf', 'inverse-laplace-cdf'), weight = NULL, study.names = NULL, gmo.xgrid = NULL, ci.level = 0.95, tau2 = NULL, mc.iteration = 10000, eta = 'Inf', verbose = FALSE, report.error = FALSE)gmeta(gmi, gmi.type = c('pivot', 'cd', 'pvalue', '2x2'), method = c('fixed-mle', 'fixed-robust1', 'fixed-robust2', 'fixed-robust2(sqrt12)', 'random-mm', 'random-reml', 'random-tau2', 'random-robust1', 'random-robust2', 'random-robust2(sqrt12)', 'fisher', 'normal', 'stouffer', 'min', 'tippett', 'max', 'sum', 'MH', 'Mantel-Haenszel', 'Peto', 'exact1', 'exact2'), linkfunc = c('inverse-normal-cdf', 'inverse-laplace-cdf'), weight = NULL, study.names = NULL, gmo.xgrid = NULL, ci.level = 0.95, tau2 = NULL, mc.iteration = 10000, eta = 'Inf', verbose = FALSE, report.error = FALSE)
gmi |
input, see ‘Details’. |
gmi.type |
type of input, including 'pivot', 'cd', 'pvalue', and '2x2', see ‘Details’. |
method |
method used for meta-analysis, including 'fisher', 'normal', 'stouffer', 'min', 'tippett', 'max', and 'sum' for combining p-values; 'fixed-mle', 'fixed-robust1', 'fixed-robust2', 'fixed-robust2(sqrt12)' for fixed-effect meta-analysis models; 'random-mm', 'random-reml', 'random-tau2', 'random-robust1', 'random-robust2', and 'random-robust2(sqrt12)' for random-effects meta-analysis models; and 'MH', 'Mantel-Haenszel', 'Peto', 'exact1', and 'exact2' for synthesizing 2x2 tables, see ‘Details’. |
linkfunc |
the link function selected for a user specified combination method, see Yang et al. (2013) and ‘Details’. |
weight |
a vector of user-specified weights for each study. If NULL, the default value depends on the |
study.names |
a vector of strings to give a user-specified study name for each study. If NULL, the default will be 'study-1', ..., 'study-k'. |
gmo.xgrid |
the position to evaluate a combined CD. The output will be reported as empirical cumulative density function (ECDF) on the points specified by gmo.xgrid. If NULL, the default will be |
ci.level |
the confidence level for confidence intervals. |
tau2 |
a numeric value to provide the heterogeneity estimation or a string to specified the method used to estimate the heterogeneity, see ‘Details’. |
mc.iteration |
number of iterations to compute the error of coverage probability of the computed confidence interval in 2x2-"exact1" method. |
eta |
a numeric vector for confidence levels of the one-sided confidence intervals for combining 2x2 tables used in "exact2" method. For example, set |
verbose |
a logical value indicating whether detailed combining information is produced. |
report.error |
a logical value indicating whether the exact error of coverage probability of the computed confidence interval for 2x2-"exact1" and 2x2-"exact2" method is reported |
gmi
The format of gmi depends on the value of gmi.type (see below in this section).
For a classical p-value combination, gmi is a vector of p-values for testing the same hypothesis. For example, gmi=c(0.02,0.03,0.14) with gmi.type='pvalue'.
For model-based meta-analysis, gmi is a list of CDs if gmi.type='cd' with gmi.type='cd' (i.e., x=seq(from=-10,to=10,by=0.001), gmi=rbind(pnorm(x,2,3), pt(x-1,4), pgamma(x-1,1,1))); gmi is a matrix or a data.frame two columns of mean and standard deviations with gmi.type='pivot' (i.e., gmi=data.frame(mean=c(2,1,1),sd=(3,4,1))).
Note that the input confidence distributions should be as complete as possible, which means the distributions should start from almost 0 and end at almost 1, though it is fine if not so. If the distributions are not all specified under different grids, interpolation will be used for interpolating the corresponding probabilities, the closest point values will used for extrapolating the probabilities outside of the original range (see approx). If summary statistics is provided, the corresponding confidence distribution is generated by normal approximation and within 4 standard deviations range symmetric around means.
For 2x2 table-based (log) odds ratio/risk difference combination, gmi is a matrix of Kx4, where K is the number of trials. The first and third column are number of events in case and control group respectively. The second and fourth column are marginal total of case and control group respectively.
gmi.type
gmi.type is a string specifying the type of input data set. The choices are pvalue for classical p-value combination, cd for model-based meta-analysis using a list of CDs, pivot for model-based meta-analysis using summary statistics (means and standard deviations), and pivot for 2x2 table-based (log) odds ratio/risk difference combination.
method
method is a string specifying the method used for meta-analysis.
For classical p-value combination, choices are fisher, normal, stouffer, tippett, min, max, and sum.
For model-based meta-analysis, choices are fixed-mle, fixed-robust1, fixed-robust2, fixed-robust2(sqrt12), random-mm, random-reml, random-tau2, random-robust1, random-robust2, and random-robust2(sqrt12).
For 2x2 table-based (log) odds ratio/risk difference combination, choices are exact1, exact2, Mantel-Haenszel, MH, and Peto.
linkfunc
linkfunc is the link function used for combining studies.
The choice of inverse-normal-cdf covers most elementary model-based meta-analysis, and achieves the Fisher efficiency asymptotically.
The choice of inverse-laplace-cdf is more robust and achieves Bahadur efficiency.
The default option of linkfunc is inverse-normal-cdf for model-based meta-analysis, and null for p-value or 2x2 table combination.
tau2
tau2 is either a numeric value for estimating heterogeneity, or a string specifying the method to estimate heterogeneity.
tau2 is only for meta-analysis random-effects models (with method=random-mm, random-reml, random-tau2, random-robust1, random-robust2, or random-robust2(sqrt12))).
Choices for tau2 are DL, HS, SJ, HE, ML, REML and EB for DerSimonian-Laird, Hedges, Sidik-Jonkman, Hunter-Schmidt, Maximum-Likelihood, Restricted-Maximum-Likelihood, and Empirical-Bayesian estimator, respectively.
An object of class gmeta, which has information of the combined inference (summarized in a CD form).
For p-value combination, it is a list of individual.pvalues, method, and combined.pvalue.
For model-based meta-analysis and 2x2 combination, it is a list of x.grids, individual.cds, individual.means, individual.stddevs, individual.medians, individual.cis, combined.cd, combined.density, combined.mean, combined.sd, combined.median, individual.ci, method, linkfunc, weight, tau2, ci.level, etc.
Revised on 2014/12/10.
Guang Yang <[email protected]>, Jerry Q. Cheng <[email protected]>, and Minge Xie <[email protected]>
Efron, B. (1996) Empirical Bayes Methods for Combining Likelihoods. Journal of the American Statistical Association, 91 538–550.
Liu, D., Liu, R. and Xie, M. (2014) Exact meta-analysis approach for discrete data and its application to 2x2 tables with rare events. Journal of the American Statistical Assocation, 109 1450-1465.
Mantel, N. and Haenszel, W. (1959) Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute, 22 719-748.
Robins, J., Breslow, N. and Greenland, S. (1986) Estimators of the Mantel-Haenszel Variance Consistent in Both Sparse Data and Large-Strata Limiting Models. Biometrics, 42 311-323.
Tian, L., Cai, T., Pfeffer, M. A., Piankov, N., Cremieux, P.-Y., and Wei, L. J. (2009) Exact and efficient inference procedure for meta-analysis and its application to the analysis of independent 2x2 tables with all available data but without artifficial continuity correction. Biostatistics, 10 275-281.
Xie, M. and Singh, K. (2013) Confidence distribution, the frequentist distribution estimator of a parameter (with discussions). International Statistical Review, 81 3-39.
Xie, M., Singh, K., and Strawderman, W. E. (2011). Confidencedence distributions and a unifying framework for meta-analysis. Journal of the American Statistical Association, 106 320-333.
Yang, G., Liu, D., Wang, J. and Xie, M. (2016). Meta-analysis framework for exact inferences with application to the analysis of rare events. Biometrics, 72 1378-1386.
Yusuf, S., Peto, R., Lewis, J., Colins, R. and Sleight, P. (1985) Beta blockade during and after myocardial infarction-An overview of randomized trials. Progress in Cardiovascular Disease, 27 335-371.
#### gmeta: generalized meta-analysis approach #### data(ulcer) ulcer.o <- as.matrix(ulcer) # p-value combination # # impute 0.5 ulcer <- ifelse(ulcer.o==0, 0.5, ulcer.o) # summary statistics ulcer.theta <- log( (ulcer[,1]*ulcer[,4]) / (ulcer[,2]*ulcer[,3]) ) ulcer.sigma <- sqrt(1/ulcer[,1] + 1/ulcer[,2] + 1/ulcer[,3] + 1/ulcer[,4]) # p-values from individual studies for K0: LOR >=0 vs. Ka: LOR < 0 ulcer.pvalues <- pnorm(ulcer.theta, mean=0, sd=ulcer.sigma) # p-value combination using gmeta function gmo.pvalue <- gmeta(ulcer.pvalues, gmi.type='pvalue', method='normal') gmo.pvalue <- gmeta(ulcer.pvalues, gmi.type='pvalue', method='tippett') print(gmo.pvalue) summary(gmo.pvalue) # model-based meta-analysis # # data.frame of summary statistics ulcer.pivots <- data.frame(mns=ulcer.theta, sds=ulcer.sigma) # fixed-effect model gmo.mdlfx <- gmeta(ulcer.pivots, method='fixed-mle', gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlfx) # random-effects model, method of moments gmo.mdlrm <- gmeta(ulcer.pivots, method='random-tau2', weight=rep(1,41), tau2=2, gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlrm) # plot of the gmeta output - forest plot of CDs plot(gmo.mdlrm, studies=c(4,8,15,16,23,41)) # default: confidence-distribution-density plot(gmo.mdlrm, studies=c(4,8,15,16,23,41), plot.option='cv') # using confidence-curve # 2x2 table-based (log) odds ratio/risk difference combination # # MH odd-ratio (OR) and Peto's log-odd-ratio (LOR) ulcer.2x2 <- cbind(ulcer[,1], ulcer[,1]+ulcer[,2], ulcer[,3], ulcer[,3]+ulcer[,4]) # Mantel-Haenszel odd-ratio gmo.2x2MH <- gmeta(ulcer.2x2, gmi.type='2x2', method='MH', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2MH) plot(gmo.2x2MH, studies=c(4,8,15,16,23,41)) # Peto's log-odd-ratio gmo.2x2Pt <- gmeta(ulcer.2x2, gmi.type='2x2', method='Peto', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2Pt) plot(gmo.2x2Pt, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on LOR based on Liu et al (2012) and RD based on Tian et al (2009) ulcer.exact <- cbind(ulcer.o[,1], ulcer.o[,1]+ulcer.o[,2], ulcer.o[,3], ulcer.o[,3]+ulcer.o[,4]) # Exact meta-analysis on log-odd-ratio (LOR) based on Liu et al (2012) #gmo.exact1 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact1', # gmo.xgrid=seq(-5,5,by=0.001), report.error=TRUE) # log-odd-ratio #summary(gmo.exact1) #plot(gmo.exact1, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on risk difference (RD) based on Tian et al (2009) #gmo.exact2 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact2', # gmo.xgrid=seq(-1,1,by=0.001), report.error=TRUE) # risk-difference #summary(gmo.exact2) #plot(gmo.exact2, studies=c(4,8,15,16,23,41), plot.option='cv')#### gmeta: generalized meta-analysis approach #### data(ulcer) ulcer.o <- as.matrix(ulcer) # p-value combination # # impute 0.5 ulcer <- ifelse(ulcer.o==0, 0.5, ulcer.o) # summary statistics ulcer.theta <- log( (ulcer[,1]*ulcer[,4]) / (ulcer[,2]*ulcer[,3]) ) ulcer.sigma <- sqrt(1/ulcer[,1] + 1/ulcer[,2] + 1/ulcer[,3] + 1/ulcer[,4]) # p-values from individual studies for K0: LOR >=0 vs. Ka: LOR < 0 ulcer.pvalues <- pnorm(ulcer.theta, mean=0, sd=ulcer.sigma) # p-value combination using gmeta function gmo.pvalue <- gmeta(ulcer.pvalues, gmi.type='pvalue', method='normal') gmo.pvalue <- gmeta(ulcer.pvalues, gmi.type='pvalue', method='tippett') print(gmo.pvalue) summary(gmo.pvalue) # model-based meta-analysis # # data.frame of summary statistics ulcer.pivots <- data.frame(mns=ulcer.theta, sds=ulcer.sigma) # fixed-effect model gmo.mdlfx <- gmeta(ulcer.pivots, method='fixed-mle', gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlfx) # random-effects model, method of moments gmo.mdlrm <- gmeta(ulcer.pivots, method='random-tau2', weight=rep(1,41), tau2=2, gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlrm) # plot of the gmeta output - forest plot of CDs plot(gmo.mdlrm, studies=c(4,8,15,16,23,41)) # default: confidence-distribution-density plot(gmo.mdlrm, studies=c(4,8,15,16,23,41), plot.option='cv') # using confidence-curve # 2x2 table-based (log) odds ratio/risk difference combination # # MH odd-ratio (OR) and Peto's log-odd-ratio (LOR) ulcer.2x2 <- cbind(ulcer[,1], ulcer[,1]+ulcer[,2], ulcer[,3], ulcer[,3]+ulcer[,4]) # Mantel-Haenszel odd-ratio gmo.2x2MH <- gmeta(ulcer.2x2, gmi.type='2x2', method='MH', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2MH) plot(gmo.2x2MH, studies=c(4,8,15,16,23,41)) # Peto's log-odd-ratio gmo.2x2Pt <- gmeta(ulcer.2x2, gmi.type='2x2', method='Peto', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2Pt) plot(gmo.2x2Pt, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on LOR based on Liu et al (2012) and RD based on Tian et al (2009) ulcer.exact <- cbind(ulcer.o[,1], ulcer.o[,1]+ulcer.o[,2], ulcer.o[,3], ulcer.o[,3]+ulcer.o[,4]) # Exact meta-analysis on log-odd-ratio (LOR) based on Liu et al (2012) #gmo.exact1 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact1', # gmo.xgrid=seq(-5,5,by=0.001), report.error=TRUE) # log-odd-ratio #summary(gmo.exact1) #plot(gmo.exact1, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on risk difference (RD) based on Tian et al (2009) #gmo.exact2 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact2', # gmo.xgrid=seq(-1,1,by=0.001), report.error=TRUE) # risk-difference #summary(gmo.exact2) #plot(gmo.exact2, studies=c(4,8,15,16,23,41), plot.option='cv')
This method synthesizes information from multiple studies and make inference that is not dependent on any distributional assumption for the study-level parameters. Specifically, the study-level parameters are assumed to be unknown, fixed parameters, it draws inferences about the quantiles of this set of parameters using study-specific summary statistics
np.gmeta(Thetahat, se, alpha = c(0.025, 0.975), n, m, band_pwr = 0.5, resample = 200, B = 40, len = 10)np.gmeta(Thetahat, se, alpha = c(0.025, 0.975), n, m, band_pwr = 0.5, resample = 200, B = 40, len = 10)
Thetahat |
input, point estimate of the true parameter for all K studies. For the kth study, the kth |
se |
input, standard error estimate of th e true parameter estimator for all K studies. For the kth study, there is a standard error estimate, denoted as the kth |
alpha |
quantile vector by default. |
n |
total sample size of all K studies. |
m |
mth ordered parameter. |
band_pwr |
a constant in (0,1). |
resample |
tuning parameter: R realization of CD-random variables for a confidence distribution for the mth ordered parameter. |
B |
tuning parameter: process with B new "observed" data. |
len |
tuning parameter: grid search for possible pairs. |
The function produces point or quantile estimation for the parameter whether tie or near tie condition exists or not.
An object of class "gmeta.interval", which is a list of following elements:
percentils
A three dimensional array containing the min.unif, max.smooth, mean.smooth.
min.unif contains quantiles using minimum pair.
max.smooth contains quantiles using maximum pair.
mean.smooth contains quantiles using mean of all satisfied pairs.
shrink The shrinkage used to obtain presumed "true values".
smoohlist A sequence.
distance The ten by ten dimensional array containing results of loss function.
elig.ind A fourteen by two dimensional array containing counts that how many pairs are smaller than threshold.
Revised on 2017/10/01.
Wei Qian <[email protected]>, Jerry Q. Cheng <[email protected]>
Brian Claggett, Minge Xie & Lu Tian(2014) Meta-Analysis With Fixed, Unknown, Study-Specific Parameters. Journal of the American Statistical Association, 109 1660-1671.
Thetahat = c(-0.102158346, 0.020746333, 0.009118397, 0.163044549, -0.098892204, 0.161200470, 0.237464018, 0.162000380, -0.088128443, 0.337433537, 0.032277816, 0.142151631, -0.225430197, -0.057114409, 0.100874063, 0.177078003, -0.752891602, 0.069141934, 0.114787217, 0.239802656, -0.029858223) se = c(0.1742206, 0.1342359, 0.1660455, 0.1372563, 0.1756401, 0.1288152, 0.2001390, 0.1603925, 0.1276070, 0.1470815, 0.1666182, 0.1694948, 0.1602534, 0.1688223, 0.1512014, 0.1857019, 0.1236781, 0.1510481, 0.1733524, 0.1627342, 0.1905231) np.gmeta(Thetahat = Thetahat, se = se, m=10, n =rep(40,21), band_pwr = 0.5, resample=200, B=40, len=10)Thetahat = c(-0.102158346, 0.020746333, 0.009118397, 0.163044549, -0.098892204, 0.161200470, 0.237464018, 0.162000380, -0.088128443, 0.337433537, 0.032277816, 0.142151631, -0.225430197, -0.057114409, 0.100874063, 0.177078003, -0.752891602, 0.069141934, 0.114787217, 0.239802656, -0.029858223) se = c(0.1742206, 0.1342359, 0.1660455, 0.1372563, 0.1756401, 0.1288152, 0.2001390, 0.1603925, 0.1276070, 0.1470815, 0.1666182, 0.1694948, 0.1602534, 0.1688223, 0.1512014, 0.1857019, 0.1236781, 0.1510481, 0.1733524, 0.1627342, 0.1905231) np.gmeta(Thetahat = Thetahat, se = se, m=10, n =rep(40,21), band_pwr = 0.5, resample=200, B=40, len=10)
Produce a forest-like plot for object of gmeta class, the result of model-based or 2x2-table-based meta-analysis using gmeta function.
## S3 method for class 'gmeta' plot(x, studies=NULL, plot.option=c('confidence-density', 'confidence-curve', 'cv', 'confidence-distribution', 'cdf'), type='l', xlab='x', ylab='density', xlim=NULL, ylim=NULL, ...)## S3 method for class 'gmeta' plot(x, studies=NULL, plot.option=c('confidence-density', 'confidence-curve', 'cv', 'confidence-distribution', 'cdf'), type='l', xlab='x', ylab='density', xlim=NULL, ylim=NULL, ...)
x |
an object of |
studies |
a vector specifying the index of individual studies shown on the plot beside the combined one. |
plot.option |
an option for plot. The default is |
type |
as the |
xlab |
as the |
ylab |
as the |
xlim |
as the |
ylim |
as the |
... |
other arguments that can be specified in |
This function produces a forest-like plot for model-based or 2x2-table-based meta-analysis from the result of gmeta function call. The argument plot.option provides a choice of displaying confidence densities, curves, or distributions.
A figure of combined and inidividual confidence densities, curves, or distributions.
Revised on 2014/12/10.
Guang Yang <[email protected]>, Jerry Q. Cheng <[email protected]> and Minge Xie <[email protected]>
Xie, M. and Singh, K. (2013) Confidence distribution, the frequentist distribution estimator of a parameter (with discussions). International Statistical Review, 81 3-39.
Xie, M., Singh, K., and Strawderman, W. E. (2011). Confidencedence distributions and a unifying framework for meta-analysis. Journal of the American Statistical Association, 106 320-333.
Yang, G., Liu, D., Wang, J. and Xie, M. (2016). Meta-analysis framework for exact inferences with application to the analysis of rare events. Biometrics, 72 1378-1386.
#### gmeta: generalized meta-analysis approach #### data(ulcer) ulcer.o <- as.matrix(ulcer) # impute 0.5 ulcer <- ifelse(ulcer.o == 0, 0.5, ulcer.o) # summary statistics ulcer.theta <- log( (ulcer[,1]*ulcer[,4]) / (ulcer[,2]*ulcer[,3]) ) ulcer.sigma <- sqrt(1/ulcer[,1] + 1/ulcer[,2] + 1/ulcer[,3] + 1/ulcer[,4]) ulcer.pivots = data.frame(mns=ulcer.theta, sds=ulcer.sigma) # fixed-effect model gmo.mdlfx <- gmeta(ulcer.pivots, method='fixed-mle', gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlfx) # random-effects model, method of moments gmo.mdlrm <- gmeta(ulcer.pivots, method='random-tau2', weight=rep(1,41), tau2=2, gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlrm) # Forest plot of CDs plot(gmo.mdlrm, studies=c(4,8,15,16,23,41)) # default: confidence-distribution-density plot(gmo.mdlrm, studies=c(4,8,15,16,23,41), plot.option='cv') # using confidence-curve # 2x2 table-based meta-analysis ulcer.2x2 <- cbind(ulcer[,1], ulcer[,1]+ulcer[,2], ulcer[,3], ulcer[,3]+ulcer[,4]) # Mantel-Haenszel odd-ratio gmo.2x2MH <- gmeta(ulcer.2x2, gmi.type='2x2', method='MH', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2MH) plot(gmo.2x2MH, studies=c(4,8,15,16,23,41)) # Peto's log-odds-ratio gmo.2x2Pt <- gmeta(ulcer.2x2, gmi.type='2x2', method='Peto', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2Pt) plot(gmo.2x2Pt, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on log-odds-ratio based on Liu et al (2012) ulcer.exact <- cbind(ulcer.o[,1], ulcer.o[,1]+ulcer.o[,2], ulcer.o[,3], ulcer.o[,3]+ulcer.o[,4]) #gmo.exact1 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact1', # gmo.xgrid=seq(-5,5,by=0.001), report.error=TRUE) #summary(gmo.exact1) #plot(gmo.exact1, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on risk difference based on Tian et al (2009) #gmo.exact2 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact2', # gmo.xgrid=seq(-1,1,by=0.001), report.error=TRUE) #summary(gmo.exact2) #plot(gmo.exact2, studies=c(4,8,15,16,23,41), plot.option='cv')#### gmeta: generalized meta-analysis approach #### data(ulcer) ulcer.o <- as.matrix(ulcer) # impute 0.5 ulcer <- ifelse(ulcer.o == 0, 0.5, ulcer.o) # summary statistics ulcer.theta <- log( (ulcer[,1]*ulcer[,4]) / (ulcer[,2]*ulcer[,3]) ) ulcer.sigma <- sqrt(1/ulcer[,1] + 1/ulcer[,2] + 1/ulcer[,3] + 1/ulcer[,4]) ulcer.pivots = data.frame(mns=ulcer.theta, sds=ulcer.sigma) # fixed-effect model gmo.mdlfx <- gmeta(ulcer.pivots, method='fixed-mle', gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlfx) # random-effects model, method of moments gmo.mdlrm <- gmeta(ulcer.pivots, method='random-tau2', weight=rep(1,41), tau2=2, gmo.xgrid=seq(from=-10,to=10,by=0.01)) summary(gmo.mdlrm) # Forest plot of CDs plot(gmo.mdlrm, studies=c(4,8,15,16,23,41)) # default: confidence-distribution-density plot(gmo.mdlrm, studies=c(4,8,15,16,23,41), plot.option='cv') # using confidence-curve # 2x2 table-based meta-analysis ulcer.2x2 <- cbind(ulcer[,1], ulcer[,1]+ulcer[,2], ulcer[,3], ulcer[,3]+ulcer[,4]) # Mantel-Haenszel odd-ratio gmo.2x2MH <- gmeta(ulcer.2x2, gmi.type='2x2', method='MH', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2MH) plot(gmo.2x2MH, studies=c(4,8,15,16,23,41)) # Peto's log-odds-ratio gmo.2x2Pt <- gmeta(ulcer.2x2, gmi.type='2x2', method='Peto', gmo.xgrid=seq(-5,5,by=0.001)) summary(gmo.2x2Pt) plot(gmo.2x2Pt, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on log-odds-ratio based on Liu et al (2012) ulcer.exact <- cbind(ulcer.o[,1], ulcer.o[,1]+ulcer.o[,2], ulcer.o[,3], ulcer.o[,3]+ulcer.o[,4]) #gmo.exact1 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact1', # gmo.xgrid=seq(-5,5,by=0.001), report.error=TRUE) #summary(gmo.exact1) #plot(gmo.exact1, studies=c(4,8,15,16,23,41)) # Exact meta-analysis on risk difference based on Tian et al (2009) #gmo.exact2 <- gmeta(ulcer.exact, gmi.type='2x2', method='exact2', # gmo.xgrid=seq(-1,1,by=0.001), report.error=TRUE) #summary(gmo.exact2) #plot(gmo.exact2, studies=c(4,8,15,16,23,41), plot.option='cv')