R软件实现meta分析
应用R软件bmeta程序包实现贝叶斯Meta分析与Meta回归

•方法学•应用R软件b m e ta程序包实现贝叶斯M eta分析与M e ta回归石丰豪\孟蕊\芮明军、马爱霞〃1. 中国药科大学国际医药商学院(南京211198)2. 中国药科大学药物经济学评价研究中心(南京211198)【摘要】R软件bm eta程序包是一款通过调用IAGS软件来实现贝叶斯M eta分析和M eta回归的程序包,该程序基于“马尔可夫链-蒙特卡罗”(MCMC)算法来合并不同类型资料(二分类、连续和计数)的各种效应量 (OR、M D和IRR)。
该程序包具有命令函数参数少、提供模型丰富、绘图功能强大、易于理解和掌握等优点。
本 文将结合实例介绍展示bmeta程序包实现贝叶斯Meta分析与M eta回归的完整操作流程。
【关键词】R语言;bmeta程序包;贝叶斯Meta分析;M eta回归Perform ing Bayesian m eta-analysis and m eta-regression using bmeta package in R softwareSHIFenghao1,M ENGRui1,RUIMingjun1,M AAixia121. School of I nternational Pharmaceutical Business, China Pharmaceutical University, Nanjing 211198, P.R.China2. Pharmacoeconomic Evaluation Research Center, China Pharmaceutical University, Nanjing211198, P.R.China Correspondingauthor:MAAixia,Email:*****************【Abstract】The R software bmeta package is a package that implements Bayesian meta-analysis and meta-regression by invoking JAGS software. The program is based on the Markov Chain Monte Carlo (MCMC) algorithm to combine various effect quantities (OR, MD and IRR) of different types of data (dichotomies, continuities and counts). The package has the advantages of fewer command function parameters, rich models, powerful drawing function, easy of understanding and mastering. In this paper, an example is presented to demonstrate the complete operation flow of bmeta package to implement bayesian meta-analysis and meta-regression.【Key words 】R language; bmeta package; Bayesian meta-analysis; Meta-regressionM eta分析作为一种整合单个研究效应量进行 证据合并的常用统计方法,在循证医学中占有重要 地位叭贝叶斯M eta分析是基于贝叶斯统计发展 起来的一种的M eta分析方法,主要采用“马尔科 夫链一蒙特卡罗 ”(Markov chain Monte C arlo, MCMC)方法,因其在处理复杂随机效应、分层结 构或是稀疏数据时比频率学M eta分析方法更有优 势,目前越来越受欢迎。
R语言网状meta分析命令

研究间网络距离分析
netdistance(net1)
节点分析
直接比较和间接比较一致性
netsplit(net1,upper=TRUE,reference.group=net1$reference.group,baseline.reference=net1$baseline.reference,sep.trts=net1$sep.trts, quote.trts="",tol.direct=0.0005)
后略
直接打开excel表格命令:
library(xlsx)
library(rJava)
data<-read.xlsx(file.choose(),sheetIndex=1)
p1 <- pairwise(list(Treatment1, Treatment2, Treatment3, Treatment4),n=list(n1, n2, n3,n4),event=list(event1, event2, event3,event4),data=data,studlab=study)
p1 <- pairwise(list(Treatment1, Treatment2, Treatment3),n=list(n1, n2, n3),event=list(event1, event2, event3),data=data,studlab=study)
p1
Four arms’ data
做加尔布雷斯图
radial(net1$TE,net1$seTE)
偏倚回归分析
metabias(net1$TE,net1$seTE ,method="linreg")
网状关系图
应用R软件metamisc程序包及CopulaREMADA程序包实现诊断准确性试验的Meta分析

应用R软件metamisc程序包及CopulaREMADA程序包实现诊断准确性试验的Meta分析王权;杨廉洁;何倩;喻亚宇;许杨鹏;张超【期刊名称】《中国循证心血管医学杂志》【年(卷),期】2016(008)004【摘要】The Meta-analysis of diagnostic test accuracy (DTA) is a research method that comprehensive evaluates the accuracy of diagnostic test evidence. The metamisc package and CopulaREMADA package in R software are used for implementing Meta-analysis and graphic plotting of DTA based on classic frequency study approach. Compared with traditional bivariate model, the analysis models established by these two packages can reduce intergroup difference and simplify the tedious iterative operation process, which make DTA evaluation indicator more accurate and efficient.%诊断性准确性试验(diagnostic test accuracy,DTA)Meta分析是一种全面评价诊断试验证据准确性的研究方法,R软件metamisc程序包与CopulaREMADA程序包是基于经典频率学方法用于DTA Meta分析制作及图形绘制的程序包,与传统的双变量模型相比,其所建立的分析模型减少了组间差异,简化了其繁琐的迭代运算过程,使诊断试验评价指标更加准确与高效。
R软件R2WinBUGS程序包在网状Meta分析中的应用

R软件R2WinBUGS程序包在网状Meta分析中的应用R软件R2WinBUGS程序包在网状Meta分析中的应用Meta分析是一种系统性综合评价的方法,用于整合多个独立研究的结果,从而获得更准确、稳定的估计结果。
而网状Meta分析则是在传统Meta分析的基础上发展起来的一种方法,能够应对大规模、复杂的研究领域,对于推动科研进展具有重要意义。
在进行网状Meta分析时,统计软件的选择和运用显得尤为关键,而R软件作为一种开源的数据分析工具,以其强大的功能和灵活性在科学研究中广泛应用。
本文将介绍R软件中的R2WinBUGS程序包,并探讨其在网状Meta分析中的应用。
R2WinBUGS是一款在R环境中调用WinBUGS程序的工具包,WinBUGS则是一种基于贝叶斯统计的软件,结合了R和WinBUGS的功能,可以方便地进行网状Meta分析。
首先,我们需要了解一些基础概念。
在Meta分析中,我们通常会使用效应量来衡量研究的结果,常见的效应量包括风险比(Risk Ratio,RR)、比率比(Rate Ratio,RaR)、标准化均值差(Standardized Mean Difference,SMD)等。
而在网状Meta分析中,除了效应量,我们还需要考虑网络图、贝叶斯方法等因素。
R2WinBUGS程序包提供了一系列函数,方便用户进行网状Meta分析的数据准备和分析。
首先,我们可以使用函数“network.data”将研究的原始数据转化为适合进行网状Meta分析的格式。
函数中的参数包括研究的名称、各组别的名称、各组别的样本量、事件数量等,可以方便地生成一个数据框。
接着,我们需要使用函数“network.graph”将数据框转化为网络图,以便更好地展示研究之间的关系。
函数中的参数包括研究名称、颜色、形状等,可以根据需要进行调整。
通过这两个函数,我们可以更好地理解各个研究之间的关系,为后续的分析提供基础。
接下来,我们可以利用贝叶斯方法进行效应量的估计和模型拟合。
R软件:诊断试验的meta分析

R软件:诊断试验的meta分析 诊断试验的meta分析。
在诊断试验中,通过金标准诊断为患者和非患者,采用某种试验方法诊断为阳性或阴性,列成四格表的形式,计算相关指标评价该试验方法的价值。
单个诊断试验中,常用灵敏度、特异度、似然比、预测值等评价诊断试验的价值。
除上述我们熟悉的指标外,我们需要了解下列指标: 诊断优势比(DOR)=真阳性*真阴性/(假阳性*假阴性),主要用于诊断试验meta分析中,作为meta分析合并时每个诊断试验权重的依据。
SROC曲线是根据单个诊断试验中的诊断优势比的权重,绘制的集成ROC曲线。
从SROC曲线上可以得到每一个研究的灵敏度和特异度,在存在阈值效应时,该方法最适合。
在绘制SROC 曲线的基础上,可计算SROC曲线下面积以及Q指数。
Q指数为在SROC曲线上,灵敏度=特异度,且最靠近左上角的坐标。
接下来,我们看看诊断试验meta分析的步骤。
与其他类型的meta分析不同的是,诊断试验meta分析中,阈值效应是异质性的重要来源。
阈值效应是因为单个诊断试验中采用不同的诊断界值引起的。
当存在阈值效应时,随着灵敏度的增加,特异度逐渐减小,反之亦然。
我们常通过计算灵敏度与特异度的Spearman相关系数探讨阈值效应,二者之间若存在强负相关则提示存在阈值效应。
但需要注意的是,灵敏度与特异度的相关并不一定都是由阈值效应引起。
当不存在阈值效应时,可以直接合并灵敏度、特异度等单一评价指标;当存在阈值效应时,应采用SROC曲线法,计算SROC曲线下面积和Q指数。
目前,可用来进行诊断试验meta分析的软件有RevMan、meta-DiSc、Stata、R软件等。
今天,我们以R软件的meta4diag程序包为例,演示下如何做诊断试验的meta分析。
meta4diag程序包的功能是基于INLA实现的,因此在使用时还需同时安装相关程序包,即INLA 程序包和sp程序包,程序如下: (1)下载程序包,若运行出错,可通过R/RStudio的工具栏,手动安装。
R语言meta分析(1)meta包

R语言meta分析(1)meta包介绍从广义上讲,meta分析是指将几项研究结果结合起来的统计分析。
这一术语是由统计学家Gene V Glass在1976年向美国教育研究协会发表演讲中创造的。
从那时起,meta分析不仅成为医学研究的重要工具,而且在经济学,金融学,社会科学和工程学中也越来越受欢迎。
许多负责制定循证医学标准的组织,例如英国国家健康和护理卓越研究所(NICE),广泛使用meta分析。
meta分析在医学中的应用是比较直观的,比如说测试相对于标准治疗的新疗法活着新药物的功效。
现实研究中,大多数研究受限于研究条件,得到样品或者患者数目相对较少,例如,目前在上列出的最大的四项呼吸道疾病试验也仅仅有533名患者入组。
因此我们需要使用“所有信息来源”来获得更准确的结果。
但是,meta分析需要建立严格的搜索相关研究的系统评价标准。
研究者必须努力避免“选择偏倚”,“发表偏倚”和其他偏倚。
优点1)能对同一课题的多项研究结果的一致性进行评价;2)对同一课题的多项研究结果作系统性评价和总结;3)提出一些新的研究问题,为进一步研究指明方向;4)当受制于某些条件时,如时间或研究对象的限制,meta分析不失为一种选择;5)从方法学的角度,对现阶段某课题的研究设计进行评价;6)发现某些单个研究未阐明的问题;7)对小样本的临床实验研究,meta分析可以统计效能和效应值估计的精确度。
因此,设计合理,严密的meta分析文章能对证据进行更客观的评价(与传统的描述性的综述相比),对效应指标进行更准确、客观的评估,并能解释不同研究结果之间的异质性。
meta分析符合人们对客观规律的认识过程,是与循证医学的思想完全一致的,是一个巨大的进步。
主要步骤1.明确简洁地提出需要解决的问题2.制定检索策略,全面广泛地收集随机对照试验3.确定纳入和排除标准,剔除不符合要求的文献4.资料选择和提取,包括原文的结果数据、图表等5.各试验的质量评估和特征描述6.统计学处理7.结果解释、作出结论及评价8.维护和更新资料。
在R软件中实现单个率的Meta分析

(中南大学公共卫生学院流行病与卫生统计学系, 长沙 410078)
[摘 要 ] 目 的 介 绍 在 R 软 件 中 实 现 单 个 率 的 Meta 分 析 方 法 。 方 法 在 R 软 件 中 加 载 Meta 分 析 程 序 包 ,
录 入 Meta 分 析 数 据 ,用 实 例 数 据 进 行 Meta 分 析 。 结 果 单 个 率 资 料 的 Meta 分 析 要 求 率 的 分 布 服 从 正 态 分 布 ,R
sm = "PRAW", Raw, i.e. untransformed, proportions ( 没 有 转 换 的 原 始 率 ) 。
sm="PLN", Log transformation(对数转换)。 sm="PLOGIT", Logit transformation(logit 转换)。 sm="PAS",Arcsine transformation(反正弦转换)。 sm="PFT", Freeman-Tukey Double arcsine transformation ( Freeman - Tukey 双 重 反 正 弦 转 换 ) 。 [14] 在 进 行 metaprop 分 析 之 前 , 对 原 始 率 及 按 四 种估计方法进行转换后的率进行正态性检验,根 据检验结果选择接近正态分布的方法。transform 为 对数据进行 计算,p、log、logit、arcsin、dsrcsin 表 示 分 别 按 上 述 五 种 方 法 估 计 率 的 函 数 、write 为 保 存 转 换后的数据,shapiro.test 为正态性检验。 命令如下: transform (rate, p=event / n, log=log (event / n), logit=log((event / n) / (1-event / n)), arcsin=asin(sqrt (event / (n +1))), darcsin =0.5 * (asin (sqrt (event / (n+1)))+asin (sqrt((event+1) / (n+1)))))->rate write.csv (rate,file="rate.csv") shapiro.test (rate p); shapiro.test (rate log); shapiro.test (rate logit); shapiro.test (rate arcsin); shapiro.test (rate darcsin) metaprop 函 数 用 于 计 算 各 个 独 立 研 究 的 率 及 95% 可 信 区 间 , 并 按 照 率 的 分 布 选 择 合 适 的 估 计 方 法,得到合并的率及 95%可信区间。 命令如下: metarate <- metaprop (event, n, study, data = rate, sm="PLOGIT", incr=0.5, allincr=TRUE, addincr=FALSE, title="") sm 表示估计样 本率的方法 , 根据正态性 检验 结果选择合适的估计方法。 本例原始率的分布为
r语言跑网络meta分析的流程

r语言跑网络meta分析的流程下载温馨提示:该文档是我店铺精心编制而成,希望大家下载以后,能够帮助大家解决实际的问题。
文档下载后可定制随意修改,请根据实际需要进行相应的调整和使用,谢谢!并且,本店铺为大家提供各种各样类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,如想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by theeditor.I hope that after you download them,they can help yousolve practical problems. The document can be customized andmodified after downloading,please adjust and use it according toactual needs, thank you!In addition, our shop provides you with various types ofpractical materials,such as educational essays, diaryappreciation,sentence excerpts,ancient poems,classic articles,topic composition,work summary,word parsing,copy excerpts,other materials and so on,want to know different data formats andwriting methods,please pay attention!R语言进行网络Meta分析的详细流程网络Meta分析是一种统计方法,用于整合多个研究结果,特别是在存在多种干预措施或比较组时。
r语言metafor代码

r语言metafor代码在R语言中,metafor包是用于进行元分析(meta-analysis)的一个常用工具。
元分析是一种统计学方法,用于综合多个研究的结果,从而得出更加全面和准确的结论。
下面是一个简单的使用metafor包进行元分析的示例代码:首先,你需要安装metafor包(如果你还没有安装的话):R.install.packages("metafor")。
然后,在你的R脚本中引入metafor包:R.library(metafor)。
接下来,你可以使用metafor包中的函数来进行元分析。
以下是一个简单的示例代码,假设你已经有了一些研究的效应大小(effect sizes)和标准误差(standard errors):R.# 创建一个包含效应大小和标准误差的数据框。
study_data <data.frame(。
effect_size = c(0.3, 0.5, 0.2, 0.4),。
se = c(0.1, 0.2, 0.15, 0.12)。
)。
# 进行元分析。
res <rma.uniyi(measure="SMD", yi=effect_size, sei=se, data=study_data)。
# 查看元分析结果。
print(res)。
在这个示例中,我们假设你已经有了一些研究的效应大小和标准误差数据,并且将这些数据存储在一个名为study_data的数据框中。
然后,我们使用rma.uni函数进行元分析,指定了效应大小和标准误差的变量名称,以及存储数据的数据框名称。
最后,我们打印出元分析的结果。
当然,这只是一个非常简单的示例,metafor包提供了许多其他功能和选项,可以根据你的具体需求进行更复杂的元分析。
希望这个示例能够帮助你开始使用metafor包进行元分析分析。
R软件在Meta分析中的应用

R软件网络Meta分析命令集合朱长太主任整理TE Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio, mean difference, or log hazard ratio).seTE Standard error of treatment estimate. 标准误= 标准差除以样本量的平方根;标准误Standard Error;标准差:Standard Deviation。
treat1 Label/Number for first treatment.treat2 Label/Number for second treatment.studlab An optional - but important! - vector with study labels.data An optional data frame containing the study information.sm A character string indicating underlying summary measure, e.g., "RD", "RR","OR", "HR", "MD", "SMD" comb.fixed A logical indicating whether a fixed effect meta-analysis should be conducted.comb.random A logical indicating whether a random effects meta-analysis should be conducted.程序运行命令library("meta")library("grid")library("netmeta")data<-read.table(file.choose(),header=T,sep=",")edit(data)net1 <- netmeta(TE, seTE, treat1, treat2,data=data,studlab=study,comb.random=T,sm="OR",reference="placebo") net1net1$Q.decompforest(net1, ref="placebo")netgraph(net1)netheat(net1)nr<-netrank(net1,small.value="bad")nr新建R表格命令:newdata=data.frame ()fix(newdata)地址直接导入数据命令data<-read.csv("D:/newdata88.csv",header=T)。
Meta分析系列之二Meta分析的软件

Meta分析系列之二Meta分析的软件一、本文概述随着医学和科研领域的快速发展,越来越多的研究者在面对大量的研究数据时,需要一种有效且科学的方法来进行综合分析和评价。
Meta 分析作为一种重要的统计学方法,能够通过整合多个独立研究的结果,提供更可靠、更有说服力的证据。
然而,要进行Meta分析,除了掌握其基本原理和方法外,还需要合适的软件工具来辅助实现。
本文将详细介绍几种常用的Meta分析软件,包括其特点、适用场景以及操作步骤,帮助读者更好地选择和应用这些软件,提高Meta分析的效率和准确性。
二、Meta分析软件概览随着统计软件和计算机技术的不断发展,越来越多的专业软件被开发出来用于执行Meta分析。
这些软件不仅提高了Meta分析的效率和精度,也使得复杂的数据处理和分析过程变得相对简单和直观。
以下是对一些常用的Meta分析软件的概览。
Stata:Stata是一款功能强大的统计软件,其内置的meta命令可以方便地进行Meta分析。
Stata提供了多种Meta分析方法,包括固定效应模型、随机效应模型等,同时也支持对异质性、发表偏倚等进行检验和处理。
Stata的图形化界面使得操作更加直观,适合初学者使用。
RevMan:RevMan(Review Manager)是由Cochrane协作网开发的一款免费的Meta分析软件。
它提供了全面的Meta分析功能,包括数据输入、数据分析、图形生成等。
RevMan还支持对研究质量进行评估,提供了一系列工具和指南帮助研究者进行高质量的Meta分析。
R语言:R语言是一款开源的统计软件,其强大的编程能力和丰富的包资源使得它在Meta分析领域具有广泛的应用。
通过安装相应的包,如“metafor”“meta”等,可以轻松进行各种复杂的Meta分析。
R 语言的灵活性使得研究者可以根据需要进行自定义分析,但同时也需要一定的编程基础。
SAS:SAS是一款商业统计软件,其PROC MIED和PROC GLM过程可以用于执行Meta分析。
Meta分析系列之二_Meta分析的软件

Meta分析系列之二:Meta分析的软件Meta分析系列之二: Meta分析的软件概述:Meta分析是一种系统回顾和整合已有研究结果的方法,能够提供更全面、准确、有力的证据,以支持决策制定、理论构建和进一步研究。
为了进行Meta分析,研究者需要借助于各种软件来处理大量的数据和进行统计分析。
本文将重点介绍几种常用的Meta分析软件,包括RevMan、Comprehensive Meta-Analysis (CMA)、Stata和R等,探讨它们的优势和适用场景。
一、RevManRevMan是Cochrane合作组织开发的一款免费软件,旨在支持系统评价和Meta分析。
它是用于系统评价和Meta分析的标准工具,具有简洁、易用的特点。
RevMan提供了多种数据输入方式,包括手动输入和导入Excel等文件,可对不同研究的结果进行整合和汇总。
此外,RevMan还提供了丰富的统计功能,如提供不同效应量的计算和绘制森林图等。
RevMan的用户界面友好,能够帮助研究者一步步完成Meta分析的各个流程,同时还提供了多语言支持,方便不同地区和国家的研究者使用。
二、Comprehensive Meta-Analysis (CMA)CMA是一款运行在Windows平台上的商业Meta分析软件,具有广泛的应用范围。
CMA不仅具备RevMan的功能,还提供了更多高级的统计分析和图形展示选项。
例如,CMA可以进行荟萃分析和医学经济学分析,包括计算合并风险比、计算敏感性分析和绘制漏斗图等。
此外,CMA还具有逼真的三维图形功能,可以帮助研究者更直观地展示统计结果。
CMA的用户界面较为复杂,对统计数据和分析方法的理解要求较高,适合有一定经验的研究者使用。
三、StataStata是一种统计分析软件,也可以用于进行Meta分析。
Stata具有强大的数据处理和统计分析功能,适用于各个学科领域的研究。
Stata可以直接读取和处理不同格式的数据文件,如Excel、CSV、SPSS等,方便研究者进行数据清洗和整理。
R语言网状meta分析命令

p1
网状meta
net1 <- netmeta(p1)
net1
两两分析异质性
net1$Q.decomp
森林图
forest(net1, ref="A")
漏斗图
funnel(net1$TE,net1$seTE)
网状meta分析
net1 <- netmeta(logRR, selogRR, treat1, treat2,data=data,studlab=study,comb.random=T,sm="RR",reference="placebo")
net1
详解异质性
net1$Q.decomp
森林图
forest(net1, ref="placebo")
第三部分间接转化计数资料
调表格
data<-read.table(file.choose(),header=T,sep=",")
查看
edit(data)
生成中间变量
logRR <- with(data, log((case1/tot1) / (case0/tot0)))
selogRR <- with(data, sqrt(1/case1 + 1/case0-1/tot1-1/tot0))
第四部分间接转化计量资料
前同(略)
生成中间变量
MD <- with(data, m1-m2)
seMD <- with(data, sqrt(sd1^2/n1+sd2^2/n2))
网状Meta分析中敏感性分析和一致性分析在R软件中的实现

网状Meta 分析中敏感性分析和一致性分析在R 软件中的实现杨博文1,2,陈欣1,2,孙皓1,2,时景璞1,2*1. 中国医科大学附属第一医院临床流行病学教研室(沈阳 110001);2. 辽宁省循证医学中心(沈阳 110001)摘要 目的 介绍网状Meta 分析的敏感性和一致性检验及其在R 软件中的应用。
方法 以实例演示的方式,采用随机效应模型与固定效应模型比较的方法实现敏感性分析,并采用R 软件metafor 包和combinat 包实现一致性分析。
结果 随机效应模型与固定效应模型所得结果相近,数据较稳健。
一致性检验结果表明,各环的可信区间均与空白值相交,说明网状Meta 分析计算结果与直接比较计算结果无明显差异,一致性较好。
结论 网状Meta 分析作为一种间接比较的分析方式,敏感性尤为重要,而一致性的引入使网状Meta 分析更准确。
通过R 软件实现网状Meta 分析的敏感性和一致性分析是一种可行的方法。
关键字 网状Meta 分析;R 软件;WinBUGS 软件;敏感性;一致性Sensitivity and Homogeneity Analysis in Network Meta-analysis Using R Soft wareYANG Bo-wen 1,2, CHEN Xin 1,2, SUN Hao 1,2, SHI Jing-pu 1,2*1. Department of Clinical Epidemiology, First Alienated Hospital, China Medical University, Shenyang 110001, China;2. Evidence-Based Medicine Center of Liaoning Province, Shenyang 110001, ChinaAbstract Objective To introduce sensitivity and homogeneity tests in network meta-analysis and its implementation in R software. Methods Using an example, we performed sensitivity analysis by comparing the random effect model with the fixed effect model. Homogeneity analysis was performed using metaphor package and combinat package in R software. Results The results of the two models were similar, and the data was steady. The results of homogeneity analysis showed that the confidential intervals in all loops were crossed over with blank value; and direct and indirect estimates of the effects in network meta-analysis were not significantly different, with good homogeneity. Conclusion Network meta-analysis is a kind of indirect comparison analysis method, and its sensitivity is especially important. The introduction of homogeneity makes network meta-analysis more accurate. Using R software for sensitivity and homogeneity analysis in network meta-analysis is a feasible method.Key words Network meta-analysis; R software; WinBUGS; Sensitivity; HomogeneityDOI: 10.7507/1672-2531.20140262作者简介:杨博文,男(1988年~),硕士研究生,以脑血管疾病与循证医学为主要研究方向。
使用R语言metaMA程序包实现基因表达谱数据的Meta分析

chips by loading different packages. Before conducting meta-analysis of gene expression profiles of microarray data
using the metaMA package, genes from different studiesneed to be converted into the same format. Draw the Venn
• 782 •
中国循证心血管医学杂志2019年7月第11卷第7期 Chin J Evid Based Cardiovasc Med,July,2019,Vol.11,No.7
• 循证研究与临床转化·方法学 •
使用R语言metaMA程序包实现基因表达谱数据的Meta分析
李贤菁1,邓巧玲1,李嘉兴1,张晨曦1,阙雅婷1,翁鸿1,黄静宇2,李胜1,3,4
Medicine and Clinical Epidemiology, The Second Clinical College, Wuhan University, Wuhan, 430071, China.
Corresponding author: Li Sheng, E-mail:lisheng-znyy@
【摘要】 基因芯片技术原理为杂交测序,即碱基互补配对原则。基因芯片技术发展迅速,是进行
基因分析的有力工具。由于基因芯片类型及其数据格式的多样性,对基因组数据进行全面和完整的分析
具有重要意义。R是一个免费、开源的统计分析软件,通过加载不同包,能实现对不同类型基因芯片的
分析。使用基于R语言的metaMA包前,需要把不同研究基因转化为统一格式。通过加载metaMA包,使用
R做meta

用R程序做meta分析的一般步骤1.如何安装meta分析模块工具菜单中“程序包”—> “安装程序包”,会出现下载数据源的镜像列表,然后选择离自己距离最近的镜像,我自己选的是China(Beijing 1)。
如下图然后会出现程序包列表,此时向下拖动列表,找到“meta”模块,点确定,然后等待安装完毕。
如下图2. 如何加载meta分析模块工具菜单“程序包”—>加载程序包,首先请先选择“grid”,点确定,然后再操作一遍,“程序包”—>加载程序包,然后选择“meta”,点确定。
至此,meta分析模块加载完毕。
如下图3.如何录入及保存数据3.1 创建数据框此时开始就需要命令操作了。
在命令窗口中输入td <- data.frame(name=c("a","b")),然后回车。
(注:td为数据框名字,name为变量名,a,b为临时变量)。
此处的数据框里内容为权宜之计,因为在建立数据框时必须含有变量,而如果此时就将分析所需的变量在此处输入比较麻烦,所以选择简单的变量作为框的支架,待框建起来就可以按照分析所需的变量进行变量定义了。
3.2 录入数据工具菜单“编辑”—>“数据编辑器”,然后出现对话框。
填入你刚刚创建的数据框名字。
点确定后,会出现传统的数据录入列表。
从下图看出,刚刚我创建的name变量名,临时变量a,b都在里面。
数据编辑器与STATA软件的数据编辑器一样,都可以随时改变变量名及数据。
现在才正式录入数据按照如下格式可以将数据进行录入。
输入完数据后,直接点击关闭,(窗口右上角的X),不用担心数据丢失。
3.3 保存数据工具菜单“文件”—>“保存工作空间”,然后把你的数据保存到你所需要保存的地方。
4. 对连续性变量绘制森林图及漏斗图4.1 对连续性变量绘制森林图4.1.1 建立数据集在命令窗口中,输入td<-metacont(Total1,Mean1,SD1,Total2,Mean2,SD2,studlab=Study,data=TmpData1,sm="MD",comb.ran dom=TRUE,comb.fixed=FALSE,label.e="Treatment",label.c="Control"然后回车。
用R做meta分析(附效应量计算神器)

⽤R做meta分析(附效应量计算神器)Hello,这⾥是⾏上⾏下,我是喵君姐姐~众所周知,R具有免费、源代码开放,以及出⾊的统计计算和绘图表现能⼒等⼀系列优点,颇受科研⼈员的喜爱。
当然,这些优势在meta分析上也表现得极为突出。
本教程以标准平均差(cohen’s d)作为效应量的meta分析为例进⾏演⽰,适⽤于⽐较两种实验条件之间因变量的差异。
例如“有、⽆⼲预条件下社交焦虑程度的差异”、“集中注意、分散注意条件下n-back任务的正确率差异”等等。
简单来讲,实证研究中,可以进⾏t检验的结果,都可以参考以下教程,对数据进⾏meta分析。
接下来,我们邀请到FarAway将逐步介绍⽤R做meta分析的基本步骤。
本⽂以软件实操讲解为主,如果读者对meta分析的原理感兴趣,推荐以下两本书⾃⾏学习。
(扫码即可购买,满100减50,还可叠加优惠券哟~)⼀、准备⼯欲善其事必先利其器,先来说说准备⼯作:1. 下载并安装R studio,在往期推⽂中我们已经详细介绍了R和Rstudio的安装教程,按步骤操作即可!2. 安装三个⼯具包:meta、metafor和xlsx3. 准备好上述需要进⾏meta分析的数据,存放在电脑中,以备调⽤。
为⽅便讲解,我们引⽤了《meta分析导论》⾥的⼀组数据(后台回复“元分析资料”即可获得案例数据),如下:从左到右,依次是纳⼊的研究效应量的编号(No)、第⼀作者的姓名(author)、发表年份(year)、实验组因变量均值(exp_mean)、实验组均值的标准差(exp_sd)、实验组样本量(exp_n)、控制组因变量均值(con_mean)、控制组均值的标准差(con_sd)、控制组样本量(con_n)、效应量(cohen’s d)、效应量95%置信区间下限(lower)、效应量95%置信区间上限(upper)、施测的地区(area)。
从上到下,每⼀⾏数据都代表⼀个原始研究(single study)的⼀个效应量,如果⼀个原始研究中包括多个效应量(如:有好⼏个实验(或成对⽐较)及其结果),那么每⼀个效应量应该作为独⽴的⼀⾏列在表格中。
HR值及其可信区间的网络meta分析(R软件gemtc程序包)

HR值及其可信区间的⽹络meta分析(R软件gemtc程序包)没有什么能够阻挡,你对⾃由的向往。
——前记⼤家好,我是⼀个⽹络meta分析爱好者,很⾼兴借freescience这个平台,和⼤家见⾯。
我们知道肿瘤学的研究,HR是⾮常重要的指标,它既包括事件,也涵盖了时间因素。
因此,⼏乎每个关于肿瘤药物的⽣存率事件都报告了HR值及其上下可信区间。
如果能利⽤这些现成的HR值及其可信上下区间的数据类型进⾏⽹络meta分析,⽆疑对研究意义重⼤。
那么这类meta分析该如何实现呢?接下来让郭哥和⼤家⼀起来挖掘gemtc程序包。
打开R 软件,安装“gemtc”、”jags”程序包#输⼊加载程序包的命令library('gemtc')library('rjags')#建⽴数据# Create a new network by specifying allinformation.treatments <>id description1 'Treatment A'2 'Treatment B'3 'Treatment C'4 'Treatment D''), header=TRUE)data <->study treatment diff std.err1 1 1.058 1.6541 2 NA NA2 1 0.005 0.6352 2 NA NA3 1 -0.409 1.6403 2 NA NA4 1 0.273 1.6424 2 NA NA5 3 -0.159 0.6125 1 NA NA6 3 0.027 0.7136 1 NA NA7 3 -1.138 1.1587 1 NA NA8 3 -0.029 1.4178 1 NA NA9 3 -0.154 0.0709 2 -0.209 0.0729 1 NA 0.0669 4 0.055 0.064'), header=TRUE)#构建⽹络network <- work(data.re="data,description='Example'," treatments="">#制作⽹络图plot(network)#建⽴模型model<-mtc.model(network,type='consistency', factor="">#设置参数,进⾏运算results <- mtc.run(model,="" n.adapt="10000," n.iter="100000," thin="10,sampler">#输出森林图forest(relative.effect(results,'1'))#输出排序结果rank.probability(results,preferredDirection=-1)OK,Gemtc程序包实现HR数据类型的⽹络meta分析运⾏结束接下来倒过来讲这个数据集的数据是如何得来的我们之前讲到⼤部分研究会直接给出HR值及其可信上下区间。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Package‘meta’January12,2010Title Meta-Analysis with RVersion1.1-8Depends R(>=2.9.1),gridAuthor Guido Schwarzer<sc@imbi.uni-freiburg.de>Maintainer Guido Schwarzer<sc@imbi.uni-freiburg.de>Date2010-01-12Description Fixed and random effects meta-analysis.Functions for tests of bias,forest and funnel plot. License GPL(>=2)Repository CRANDate/Publication2010-01-1213:14:17R topics documented:addvar (2)ci (3)Fleiss93 (4)Fleiss93cont (5)forest (6)funnel (10)funnel.meta (12)labbe (16)labbe.metabin (17)metabias (20)metabin (22)metacont (27)metacr (29)metacum (31)metagen (33)metainf (35)12addvar metaprop (37)Olkin95 (39)plot.meta (40)print.meta (43)read.mtv (46)read.rm5 (48)trimfill (51)trimfill.meta (53)Index56 addvar Additional functions for objects of class metaDescriptionThe as.data.frame method returns a data frame containing information on individual studies,e.g.,estimated treatment effect and its standard error.The function addvar can be used to add asingle variable to an object of class meta which for example is useful to conduct sub-group analysis or meta-regression.Usage##S3method for class'meta':as.data.frame(x,s=NULL,optional=FALSE,...)addvar(x,y,varname,by.x="studlab",by.y=by.x)Argumentsx An object of class meta.s NULL or a character vector giving the row names for the data frame.optional logical.If TRUE,setting row names and converting column names(to syntactic names)is optional.y A data frame with an additional covariatevarname A character specifying name of additional variableby.x,by.y Specifications of the common columns(see merge)...other argumentsValueA data frame is returned by the function as.data.frame.A single covariate is returned by the function addvar which can be added to an object of classmeta.Internally,the merge function is utilised.ci3Author(s)Guido Schwarzer<sc@imbi.uni-freiburg.de>See Alsometabin,metacont,metagenExamplesdata(Fleiss93cont)meta1<-metacont(n.e,mean.e,sd.e,n.c,mean.c,sd.c,study,data=Fleiss93cont,sm="SMD")##Generate additional variable#Fleiss93cont$group<-c(1,2,1,1,2)##Generate new variable by merging#object'meta1'and data frame'Fleiss93cont'#meta1$group<-addvar(meta1,Fleiss93cont,"group",by.y="study")as.data.frame(meta1)summary(meta1,byvar=group)ci Calculation of confidence intervals(normal approximation)DescriptionCalculation of confidence intervals;based on normal approximation.Usageci(TE,seTE,level=0.95)ArgumentsTE Estimated treatment effect.seTE Standard error of treatment estimate.level The confidence level required.ValueList with componentsTE Estimated treatment effect.seTE Standard error of treatment estimate.lower Lower confidence limits.4Fleiss93upper Upper confidence limits.zscore Test statistic.p P-value of test with null hypothesis TE=0.level The confidence level required.NoteThis function is primarily called from other functions of the library meta,e.g.plot.meta, summary.meta.Author(s)Guido Schwarzer<sc@imbi.uni-freiburg.de>Examplesas.data.frame(ci(170,10))as.data.frame(ci(170,10,0.99))Fleiss93Aspirin after Myocardial InfarctionDescriptionMeta-analysis on Aspirin in Preventing Death after Myocardial InfarctionUsagedata(Fleiss93)FormatA data frame with the following columns:study study labelyear year of publicationevent.e number of events in experimental groupn.e number of observations in experimental groupevent.c number of events in control groupn.c number of observations in control groupSourceFleiss JL(1993),The statistical basis of meta-analysis.Statistical Methods in Medical Research,2, 121–145.Fleiss93cont5Examplesdata(Fleiss93)metabin(event.e,n.e,event.c,n.c,data=Fleiss93,studlab=paste(study,year),sm="OR",comb.random=FALSE)Fleiss93cont Mental Health TreatmentDescriptionMeta-analysis on the Effect of Mental Health Treatment on Medical UtilisationUsagedata(Fleiss93cont)FormatA data frame with the following columns:study study labelyear year of publicationn.e number of observations in experimental groupmean.e estimated mean in experimental groupsd.e standard deviation in experimental groupn.c number of observations in control groupmean.c estimated mean in control groupsd.c standard deviation in control groupSourceFleiss JL(1993),The statistical basis of meta-analysis.Statistical Methods in Medical Research,2, 121–145.See AlsoFleiss93Examplesdata(Fleiss93cont)metacont(n.e,mean.e,sd.e,n.c,mean.c,sd.c,data=Fleiss93cont,studlab=paste(study,year),comb.random=FALSE)forest Forest plot(new plot function for objects of class meta)DescriptionDraws a forest plot in the active graphics window(using grid graphics system).Usageforest(x,byvar=x$byvar,bylab=x$bylab,print.byvar=x$print.byvar,sortvar,studlab=TRUE,level=x$level,b=x$b,comb.fixed=x$comb.fixed,comb.random=x$comb.random,overall=TRUE,text.fixed="Fixed effect model",text.random="Random effects model",lty.fixed=2,lty.random=3,xlab=NULL,xlab.pos=ref,xlim,allstudies=TRUE,weight,ref=ifelse(x$sm%in%c("RR","OR","HR"),1,0),leftcols=NULL,rightcols=NULL,leftlabs=NULL,rightlabs=NULL,lab.e=x$label.e,lab.c=x$label.c,lab.e.attach.to.col=NULL,lab.c.attach.to.col=NULL,lwd=1,at=NULL,label=TRUE,fontsize=12,boxsize=0.8,plotwidth=unit(6,"cm"),colgap=unit(2,"mm"),col.i="black",col.by="darkgray",digits=2)Argumentsx An object of class meta.byvar An optional vector containing grouping information(must be of same length asx$TE).Parameter byvar can not be used if x is an object of class metacumor metainf.bylab A character string with a label for the grouping variable.print.byvar A logical indicating whether the name of the grouping variable should be printedin front of the group labels.sortvar An optional vector used to sort the individual studies(must be of same length asx$TE).studlab A logical indicating whether study labels should be printed in the graph.Avector with study labels can also be provided(must be of same length as x$TEthen).level The level used to calculate confidence intervals for individual studies.b The level used to calculate confidence intervals for pooled estimates.comb.fixed A logical indicating whetherfixed effect estimate should be plotted.comb.random A logical indicating whether random effects estimate should be plotted. overall A logical indicating whether overall summaries should be plotted.This param-eter is useful in combination with the parameter byvar if summaries shouldonly be plotted on group level.text.fixed A character string used in the plot to label the pooledfixed effect estimate. text.random A character string used in the plot to label the pooled random effects estimate. lty.fixed Line type(pooledfixed effect estimate).lty.random Line type(pooled random effects estimate).xlab A label for the x axis.xlab.pos A numeric specifying the center of the label on the x axis.xlim The x limits(min,max)of the plot.allstudies A logical indicating whether studies with inestimable treatment effects should be plotted.weight A character string indicating which type of plotting symbols is to be used for in-dividual treatment estimates.One of missing(see Details),"same","fixed",or"random",can be abbreviated.Plot symbols have the same size for all stud-ies or represent study weights fromfixed effect or random effects model.ref A numerical giving the reference value to be plotted as a line in the forest plot.No reference line is plotted if parameter ref is equal to NA.leftcols A character vector specifying(additional)columns to be plotted on the left side of the forest plot(see Details).rightcols A character vector specifying(additional)columns to be plotted on the right side of the forest plot(see Details).leftlabs A character vector specifying labels for(additional)columns on left side of the forest plot(see Details).rightlabs A character vector specifying labels for(additional)columns on right side of the forest plot(see Details).lab.e Label to be used for experimental group in table heading.lab.c Label to be used for control group in table heading.lab.e.attach.to.colA character specifying the column name where label lab.e should be attachedto in table heading.lab.c.attach.to.colA character specifying the column name where label lab.c should be attachedto in table heading.lwd The line width,see par.at The points at which tick-marks are to be drawn,see grid.xaxis.label A logical value indicating whether to draw the labels on the tick marks,or an ex-pression or character vector which specify the labels to use.See grid.xaxis. fontsize The size of text(in points),see gpar.boxsize A numeric used to increase or decrease the size of boxes in the forest plot.plotwidth A unit object specifying width of the forest plot.colgap A unit object specifying gap between columns printed on left and right side offorest plot.col.i The colour for individual study results and confidence limits.col.by A character specifying colour to print information on subgroups.digits Minimal number of significant digits,see print.default.DetailsA forest plot,also called confidence interval plot,is drawn in the active graphics window.Sub-groupanalyses are conducted and displayed in the plot if byvar is not missing.The forest function is based on the grid graphics system.Therefore,to plot a newfigure inan existing graphics window,one has to use the grid.newpage function.In order to print theforest plot,(i)resize the graphics window,(ii)either use dev.copy2eps or dev.copy2pdf.For basic forest plots,the plot.meta function can be used.Information from object x is utilised if argument weight is missing.Weights from thefixed effectmodel are used(weight="fixed")if parameter x$comb.fixed is TRUE;weights from therandom effects model are used(weight="random")if parameter x$comb.random is TRUEand x$comb.fixed is FALSE.The parameters leftcols and rightcols can be used to specify columns which are plotted onthe left and right side of the forest plot,respectively.If these parameters are NULL,the followingdefault columns will be plotted.Parameter rightcols:(i)estimated treatment effect with level-confidence interval,(ii)in ad-dition,weights of thefixed and/or random effects model will be given,if comb.fixed=TRUEand/or comb.random=TRUE.For an object of class metacum or metainf only the estimatedtreatment effect with level-confidence interval are plotted.Parameter leftcols:(i)leftcols=c("studlab","event.e","n.e","event.c","n.c")for an object of class metabin,(ii)leftcols=c("studlab","n.e","mean.e","sd.e","n.c","mean.c","sd.c")for an object of class metacont,(iii)leftcols=c("studlab", "TE","seTE")for an object of class metagen,(iv)leftcols=c("studlab","event","n")for an object of class metaprop,(v)leftcols=c("studlab")for an object of classmetacum or metainf.The parameters leftlabs and rightlabs can be used to specify column headings which areplotted on left and right side of the forest plot,respectively.For certain columns predefined labelsexist.If the parameters leftlabs and rightlabs are NULL,the following default labels willbe used:for columns c("studlab","TE","seTE","n.e","n.c","event.e","event.c","mean.e","mean.c","sd.e","sd.c","effect","ci","w.fixed","w.random")the labels c("Study","TE","seTE","Total","Total","Events","Events","Mean","Mean","SD","SD",summary measure,level for confidence interval,"W(fixed)","W(random)").For additional columns the column name willbe used as label.It is possible to only provide labels for new columns(see Examples).If parameters lab.e and lab.c are NULL,"Experimental"and"Control"are used as labels forexperimental and control group,respectively.For subgroups(argument byvar not NULL),results for thefixed effect model will be plotted if both arguments comb.fixed and comb.random are TRUE.In order to plot results for the random effects model within subgroups,use comb.fixed==FALSE and comb.random==TRUE.Review Manager5(RevMan5)is the current software used for preparing and maintaining Cochrane Reviews(/revman/).In RevMan5,subgroup analyses can be defined and data from a Cochrane review can be imported to R using the function read.rm5.Ifa meta-analysis is then conducted using function metacr,information on subgroups is availablein R(components byvar,bylab,and print.byvar,byvar in an object of class"meta").Accordingly,by using function metacr there is no need to define subgroups in order to redo the statistical analysis conducted in the Cochrane review.Author(s)Guido Schwarzer<sc@imbi.uni-freiburg.de>See Alsoplot.meta,metabin,metacont,metagenExamplesdata(Olkin95)meta1<-metabin(event.e,n.e,event.c,n.c,data=Olkin95,subset=c(41,47,51,59),sm="RR",meth="I",studlab=paste(author,year))grid.newpage()####Do forest plot##forest(meta1,comb.fixed=TRUE,comb.random=TRUE)grid.newpage()####Change set of columns printed on left side##of forest plot##forest(meta1,comb.fixed=TRUE,comb.random=FALSE,leftcols="studlab")grid.newpage()#### 1.Change order of columns on left side## 2.Attach labels to columns'event.e'and'event.c'##instead of columns'n.e'and'n.c'##forest(meta1,10funnel leftcols=c("studlab","n.e","event.e","n.c","event.c"),lab.e.attach.to.col="event.e",lab.c.attach.to.col="event.c",comb.fixed=TRUE)Olkin95$studlab<-paste(Olkin95$author,Olkin95$year)####Add variables'year'and'author'to meta-analysis object##meta1$year<-addvar(meta1,Olkin95,"year")meta1$author<-addvar(meta1,Olkin95,"author")grid.newpage()####Specify column labels only for newly created variables##'year'and'author'##forest(meta1,leftcols=c("studlab","event.e","n.e","event.c","n.c","author","year"),leftlabs=c("Author","Year of Publ"),comb.fixed=TRUE)funnel Generic function to produce a funnel plot.DescriptionDraw a funnel or radial plot to assess funnel plot asymmetry in the active graphics window.A contour-enhanced funnel plot can be produced for assessing causes of funnel plot asymmetry. Usagefunnel(x,y,...)Argumentsx An object of class meta,or estimated treatment effect in individual studies.y Standard error of estimated treatment effect(mandatory if x not of class meta)....Graphical parameters as in par may also be passed as arguments.DetailsFor simple funnel plots,funnel.default will be used.For an object of class meta the function funnel.meta will be used instead.A funnel plot or radial plot,also called Galbraith plot,is drawn in the active graphics window.Ifcomb.fixed is TRUE,the pooled estimate of thefixed effect model is plotted.If level is not NULL,the corresponding confidence limits are drawn.funnel11 In the funnel plot,if yaxis is"se",the standard error of the treatment estimates is plotted on the y axis which is likely to be the best choice(Sterne&Egger,2001).Other possible choices for yaxis are"invvar"(inverse of the variance),"invse"(inverse of the standard error),and "size"(study size).For yaxis!="size",contour-enhanced funnel plots can be produced(Peters et al.,2008)by specifying the contour levels(argument contour.levels).By default(argument col.contour missing),suitable gray levels will be used to distinguish the contours.Different colours can be cho-sen by argument col.contour.Author(s)Guido Schwarzer<sc@imbi.uni-freiburg.de>,Petra Graham<pgraham@.au> ReferencesGalbraith RF(1988a),Graphical display of estimates having differing standard errors.Technomet-rics,30,271–281.Galbraith RF(1988b),A note on graphical presentation of estimated odds ratios from several clini-cal trials.Statistics in Medicine,7,889–894.Light RJ&Pillemer DB(1984),Summing Up.The Science of Reviewing Research.Cambridge: Harvard University Press.Peters JL,Sutton AJ,Jones DR,Abrams KR,Rushton L(2008),Contour-enhanced meta-analysis funnel plots help distinguish publication bias from other causes of asymmetry.Journal of Clinical Epidemiology,61,991–996.Sterne JAC&Egger M(2001),Funnel plots for detecting bias in meta-analysis:Guidelines on choice of axis.Journal of Clinical Epidemiology,54,1046–1055.See Alsometabias,funnel.default,funnel.metaExamplesdata(Olkin95)meta1<-metabin(event.e,n.e,event.c,n.c,data=Olkin95,subset=c(41,47,51,59),studlab=paste(author,year),sm="RR",meth="I")oldpar<-par(mfrow=c(2,2))####Funnel plots##funnel(meta1)####Same result as code above:##funnel(meta1$TE,meta1$seTE,sm="RR")####Funnel plot with confidence intervals,##fixed effect estimate and contours##cc<-funnel(meta1,comb.fixed=TRUE,level=0.95,contour=c(0.9,0.95,0.99))$col.contour legend(0.05,0.05,c("0.1>p>0.05","0.05>p>0.01","<0.01"),fill=cc) ####Contour-enhanced funnel plot with user-chosen colours##funnel(meta1,comb.fixed=TRUE,level=0.95,contour=c(0.9,0.95,0.99),col.contour=c("darkgreen","green","lightgreen"),lwd=2,cex=2,pch=16,studlab=TRUE,cex.studlab=1.25)legend(0.05,0.05,c("0.1>p>0.05","0.05>p>0.01","<0.01"),fill=c("darkgreen","green","lightgreen"))par(oldpar)funnel.meta Plot to assess funnel plot asymmetryDescriptionDraw a funnel or radial plot to assess funnel plot asymmetry in the active graphics window.A contour-enhanced funnel plot can be produced for assessing causes of funnel plot asymmetry.Usage##Default S3method:funnel(x,y,xlim=NULL,ylim=NULL,xlab=NULL,ylab=NULL,comb.fixed=FALSE,comb.random=FALSE,axes=TRUE,pch=21,text=NULL,cex=1,lty.fixed=2,lty.random=9,lwd=1,lwd.fixed=lwd,lwd.random=lwd,col="black",bg="darkgray",col.fixed="black",col.random="black",log="",yaxis="se",sm=NULL,contour.levels=NULL,col.contour,ref=ifelse(sm%in%c("RR","OR","HR"),1,0),level=NULL,studlab=FALSE,cex.studlab=0.8,...)##S3method for class'meta':funnel(x,y,xlim=NULL,ylim=NULL,xlab=NULL,ylab=NULL,comb.fixed=x$comb.fixed,comb.random=x$comb.random,axes=TRUE,pch=21,text=NULL,cex=1,lty.fixed=2,lty.random=9,lwd=1,lwd.fixed=lwd,lwd.random=lwd,col="black",bg="darkgray",col.fixed="black",col.random="black",log="",yaxis="se",sm=NULL,contour.levels=NULL,col.contour,ref=ifelse(x$sm%in%c("RR","OR","HR"),1,0),level=x$level,studlab=FALSE,cex.studlab=0.8,...)radial(x,y,xlim=NULL,ylim=NULL,xlab="Inverse of standard error",ylab="Standardised treatment effect(z-score)",comb.fixed=TRUE,axes=TRUE,pch=1,text=NULL,cex=1,col=NULL,level=NULL,...)Argumentsx An object of class meta,or estimated treatment effect in individual studies.y Standard error of estimated treatment effect(mandatory if x not of class meta).xlim The x limits(min,max)of the plot.ylim The y limits(min,max)of the plot.xlab A label for the x axis.ylab A label for the y axis.comb.fixed A logical indicating whether the pooledfixed effect estimate should be plotted.comb.random A logical indicating whether the pooled random effects estimate should be plot-ted.axes A logical indicating whether axes should be drawn on the plot.pch The plotting symbol used for individual studies.text A character vector specifying the text to be used instead of plotting symbol.cex The magnification to be used for plotting symbol.lty.fixed Line type(pooledfixed effect estimate).lty.random Line type(pooled random effects estimate).col A vector with colour of plotting symbols.bg A vector with background colour of plotting symbols(only used if pch in21:25).col.fixed Color of line representignfixed effect estimate.col.random Color of line representign random effects estimate.lwd The line width for confidence intervals(if level is not NULL).lwd.fixed The line width forfixed effect estimate(if comb.fixed is not NULL).lwd.random The line width for random effects estimate(if comb.random is not NULL).log A character string which contains"x"if the x axis is to be logarithmic,"y"if the y axis is to be logarithmic and"xy"or"yx"if both axes are to belogarithmic(applies only to function funnel).yaxis A character string indicating which type of weights are to be used.Either"se","invvar","invse",or"size"(applies only to function funnel).sm A character string indicating underlying summary measure,e.g.,"RD","RR","OR","AS","MD","SMD"(applies only to function funnel).contour.levelsA numeric vector specifying contour levels to produce contour-enhanced funnelplot.col.contour Colour of contours.ref Reference value(null effect)used to produce contour-enhanced funnel plot.level The confidence level utilised in the plot.For the funnel plot,confidence limitsare not drawn if yaxis="size".studlab A logical indicating whether study labels should be printed in the graph.Avector with study labels can also be provided(must be of same length as x$TEthen).cex.studlab Size of study labels....Graphical parameters as in par may also be passed as arguments.DetailsA funnel plot or radial plot,also called Galbraith plot,is drawn in the active graphics window.Ifcomb.fixed is TRUE,the pooled estimate of thefixed effect model is plotted.If level is not NULL,the corresponding confidence limits are drawn.In the funnel plot,if yaxis is"se",the standard error of the treatment estimates is plotted on the y axis which is likely to be the best choice(Sterne&Egger,2001).Other possible choices for yaxis are"invvar"(inverse of the variance),"invse"(inverse of the standard error),and "size"(study size).For yaxis!="size",contour-enhanced funnel plots can be produced(Peters et al.,2008)by specifying the contour levels(argument contour.levels).By default(argument col.contour missing),suitable gray levels will be used to distinguish the contours.Different colours can be cho-sen by argument col.contour.Author(s)Guido Schwarzer<sc@imbi.uni-freiburg.de>,Petra Graham<pgraham@.au>ReferencesGalbraith RF(1988a),Graphical display of estimates having differing standard errors.Technomet-rics,30,271–281.Galbraith RF(1988b),A note on graphical presentation of estimated odds ratios from several clini-cal trials.Statistics in Medicine,7,889–894.Light RJ&Pillemer DB(1984),Summing Up.The Science of Reviewing Research.Cambridge: Harvard University Press.Peters JL,Sutton AJ,Jones DR,Abrams KR,Rushton L(2008),Contour-enhanced meta-analysis funnel plots help distinguish publication bias from other causes of asymmetry.Journal of Clinical Epidemiology,61,991–996.Sterne JAC&Egger M(2001),Funnel plots for detecting bias in meta-analysis:Guidelines on choice of axis.Journal of Clinical Epidemiology,54,1046–1055.See Alsometabias,metabin,metagenExamplesdata(Olkin95)meta1<-metabin(event.e,n.e,event.c,n.c,data=Olkin95,subset=c(41,47,51,59),studlab=paste(author,year),sm="RR",meth="I")####Radial plot##radial(meta1,level=0.95)oldpar<-par(mfrow=c(2,2))####Funnel plots##funnel(meta1)####Same result as code above:##funnel(meta1$TE,meta1$seTE,sm="RR")####Funnel plot with confidence intervals,##fixed effect estimate and contours##cc<-funnel(meta1,comb.fixed=TRUE,level=0.95,contour=c(0.9,0.95,0.99))$col.contour legend(0.05,0.05,16labbe c("0.1>p>0.05","0.05>p>0.01","<0.01"),fill=cc) ####Contour-enhanced funnel plot with user-chosen colours##funnel(meta1,comb.fixed=TRUE,level=0.95,contour=c(0.9,0.95,0.99),col.contour=c("darkgreen","green","lightgreen"),lwd=2,cex=2,pch=16,studlab=TRUE,cex.studlab=1.25) legend(0.05,0.05,c("0.1>p>0.05","0.05>p>0.01","<0.01"),fill=c("darkgreen","green","lightgreen"))par(oldpar)labbe LÁbbe plotDescriptionGeneric function for drawing a L\’Abbe plot.Usagelabbe(x,y,...)Argumentsx The x coordinates of points of the L\’Abbe plot.Alternatively,an object of class metabin.y The y coordinates of the L\’Abbe plot,optional if x is an appropriate structure....Parameters used in other L\’Abbe plot functions.DetailsGeneric function for drawing a L\’Abbe plot.Author(s)Guido Schwarzer<sc@imbi.uni-freiburg.de>ReferencesL’Abbe KA,Detsky AS,O’Rourke K(1987),Meta-analysis in clinical research.Annals of Internal Medicine,107,224–233.See Alsolabbe.metabin,metabinExamplesdata(Olkin95)meta1<-metabin(event.e,n.e,event.c,n.c,data=Olkin95,studlab=paste(author,year),sm="RR")####L'Abbe plot##labbe(meta1)labbe.metabin LÁbbe plotDescriptionDraw a L\’Abbe plot.Usage##S3method for class'metabin':labbe(x,y,xlim,ylim,xlab=NULL,ylab=NULL,TE.fixed=x$TE.fixed,TE.random=x$TE.random,comb.fixed=x$comb.fixed,comb.random=x$comb.random,axes=TRUE,pch=21,text=NULL,cex=1,col="black",bg="lightgray",lwd=1,lwd.fixed=lwd,lwd.random=lwd,lty.fixed=2,lty.random=9,sm=x$sm,weight,studlab=FALSE,cex.studlab=0.8,...)##Default S3method:labbe(x,y,xlim,ylim,xlab=NULL,ylab=NULL,TE.fixed,TE.random,comb.fixed=FALSE,comb.random=FALSE,axes=TRUE,pch=21,text=NULL,cex=1,。