R语言meta分析(1)meta包
R语言meta分析(2)单个率的Meta分析
R语言meta分析(3)亚组分析
R语言meta分析(4)网状Meta 分析
R语言meta分析(5)累积Meta分析
R语言meta分析(6)一文解决诊断性meta分析(第一章)
R语言meta分析(7)诊断性meta分析(meta4diag包)
R语言meta分析(8)基于生存数据的meta分析
R语言meta分析(9)连续数据的meta分析
本文将介绍用R软件的meta数据包介绍连续数据资料的Meta分析。meta数据包提供分析连续数据的命令是: metacont(),能够计算连续型资料的固定效应值或随机效应值,命令提供了SMD和MD两种方法。
具体命令格式如下:
代码语言:javascript复制metacont(n.e,mean.e, sd.e, n.c, mean.c, sd.c, studlab, data=NULL, subset=NULL, level=0.95, 1eve1.comb=leve1, sm=MD, comb.fixed=TRUE, comb.random=TRUE)
实战
- 第一步
##########################################################################################
## step1 load package and data
###########################################################################################
setwd('D:\train\meta_data\meta')
data <- read.csv('Table1.csv',header=T)
colnames(data)
library(ggplot2)
library(meta)
str(data)
data.frame': 19 obs. of 9 variables:
$ study : Factor w/ 19 levels "GSE102286","GSE114711",..: 3 4 5 6 7 8 9 10 11 12 ...
$ Year : int 2012 2014 2012 2014 2014 2017 2015 2015 2016 2017 ...
$ NSCLC_count : int 22 24 22 6 103 82 14 154 126 397 ...
$ NSCLC_mean : num 7.87 7.48 1.64 672.57 9.23 ...
$ NSCLC_sd : num 0.782 1.25 0.901 701.222 0.67 ...
$ Control_count: int 19 24 23 6 103 59 14 20 5 151 ...
$ Control_mean : num 8.09 8.46 2.21 648.14 9.28 ...
$ Control_sd : num 0.826 1.55 0.641 587.815 0.622 ...
$ Source : Factor w/ 2 levels "blood","tissue": 2 2 1 2 2 1 2 2 2 2 .
命令中,NSCLC_count, NSCLC_mean , NSCLC_sd分别为实验组的例数、均数和标准差,Control_count,Control_mean, Control_sd分别为对照组的例数、均数和标准差。
代码语言:javascript复制##########################################################################################
## step2 meta-analysis
###########################################################################################
metawsd = metacont(NSCLC_count,NSCLC_mean,NSCLC_sd,
Control_count,Control_mean,Control_sd,
data=data ,sm="SMD",
comb.fixed = FALSE,
comb.random = TRUE,
studlab = study)
metawsd
SMD 95%-CI %W(random)
GSE14936 -0.2709 [ -0.8878; 0.3460] 5.4
GSE25508 -0.6835 [ -1.2670; -0.1000] 5.5
GSE27486 -0.7220 [ -1.3270; -0.1170] 5.4
GSE29248 0.0349 [ -1.0969; 1.1666] 4.3
GSE36681 -0.0685 [ -0.3417; 0.2047] 5.9
GSE40738 -0.5027 [ -0.8425; -0.1628] 5.9
GSE47525 -0.0963 [ -0.8376; 0.6450] 5.2
GSE48414 -0.9530 [ -1.4298; -0.4763] 5.7
GSE51853 -8.8280 [-10.2341; -7.4220] 3.8
GSE53882 -0.1024 [ -0.2899; 0.0851] 6.0
GSE56036 -0.8510 [ -1.4562; -0.2459] 5.4
GSE63805 -1.6782 [ -2.2624; -1.0940] 5.5
GSE64591 -0.1591 [ -0.4367; 0.1185] 5.9
GSE72526 0.6920 [ 0.1608; 1.2231] 5.6
GSE74190 -3.4235 [ -4.0079; -2.8391] 5.5
GSE77380 -0.5563 [ -1.8425; 0.7299] 4.0
GSE93300 0.2213 [ -0.9609; 1.4035] 4.2
GSE102286 -0.8262 [ -1.1318; -0.5207] 5.9
GSE114711 -0.0612 [ -0.9280; 0.8055] 4.9
Number of studies combined: k = 19
SMD 95%-CI z p-value
Random effects model -0.8819 [-1.3246; -0.4392] -3.90 < 0.0001
Quantifying heterogeneity:
tau^2 = 0.8421 [0.9930; 4.6691]; tau = 0.9177 [0.9965; 2.1608];
I^2 = 94.2% [92.3%; 95.7%]; H = 4.17 [3.60; 4.83]
Test of heterogeneity:
Q d.f. p-value
312.69 18 < 0.0001
Details on meta-analytical method:
- Inverse variance method
- DerSimonian-Laird estimator for tau^2
- Jackson method for confidence interval of tau^2 and tau
- Hedges' g (bias corrected standardised mean difference)
代码语言:javascript复制Quantifying heterogeneity: tau^2 = 0.8421 0.9930; 4.6691; tau = 0.9177 0.9965; 2.1608; I^2 = 94.2% 92.3%; 95.7%; H = 4.17 3.60; 4.83 我们发现该meta分析存在异质性,因此要做亚组分析。
##########################################################################################
## step3 plot forest
###########################################################################################
pdf('meta.pdf',height = 12,width = 12)
forest(metawsd)
dev.off()
##########################################################################################
## step4 sensitivity_analysis
###########################################################################################
metainf(metawsd, pooled="random")
pdf('sensitivity_analysis.pdf',height = 8,width =8)
forest(metainf(metawsd),comb.random = TRUE)
dev.off()
##########################################################################################
## step5 bias
###########################################################################################
metabias(metawsd, method.bias = "rank")
pdf('funnel_plot.pdf',height = 6,width = 6)
meta::funnel(metawsd[["TE"]],metawsd[["seTE"]],
ylab='SMD', xlab='se.SMD',
comb.fixed =T,level = 0.95)
dev.off()