这次和大家分享的还是基于R包‘gemtc‘的网状Meta分析,之前已经讲解过如何导入数据以及使用固定效应模型去分析。这一次主要内容是使用随机效应模型去进行网状Meta分析,同时包括一致性检验和概率排序的结果。
1. 首先利用之前的数据network_b_bin去构建随机效应模型。
model_b_bin_re <- mtc.model(network_b_bin, linearModel='random', n.chain=4)
2. 使用Markov Chain & Monte Carlo(MCMC)方法进行抽样模拟和计算,参数为n.adapt=5000, n.iter=10000, thin=20。
###MCMC simulation###
### burn-in 5000, iteration 10000, thin 20 ########
mcmc_b_bin_re <- mtc.run(model_b_bin_re, n.adapt=5000, n.iter=10000, thin=20)
plot(mcmc_b_bin_re)
gelman.diag(mcmc_b_bin_re)
gelman.plot(mcmc_b_bin_re)
summary(mcmc_b_bin_re)
3. 使用Markov Chain & Monte Carlo(MCMC)方法进行抽样模拟和计算,参数为n.adapt=5000, n.iter=10000, thin=5。
### burn-in 5000, iteration 10000, thin 5 ########
mcmc_b_bin_re <- mtc.run(model_b_bin_re, n.adapt=5000, n.iter=10000, thin=5)
plot(mcmc_b_bin_re)
gelman.diag(mcmc_b_bin_re)
gelman.plot(mcmc_b_bin_re)
summary(mcmc_b_bin_re)
4. 绘制森林图
forest(relative.effect(mcmc_b_bin_re, t1="A"), digits=3)
5. 一致性检验
###Inconsistency : node-splitting
#mtc.nodesplit
#fixed model
nodesplit_b_bin_fe <- mtc.nodesplit(network_b_bin, linearModel='fixed', n.adapt=5000,
n.iter=10000, thin=10)
# plot(nodesplit_b_bin_fe)
plot(summary(nodesplit_b_bin_fe))
#random moel
nodesplit_b_bin_re <- mtc.nodesplit(network_b_bin, linearModel='random', n.adapt=5000,
n.iter=10000, thin=5)
#plot(nodesplit_b_bin_re)
plot(summary(nodesplit_b_bin_re))
代码的前一半是基于固定效应模型进行的一致性分析,后半部分是基于随机效应模型进行的一致性分析。
上面就是固定效应模型的一致性分析结果,direct是指pairwise comparsion,也即直接比较,indirect是指indirect comparison,也即间接比较,P值反应的其实是直接比较和简介比较的结果之间是否有差异,一般p小于0.05,可以认为直接比较和间接比较的结果之间存在差异,及有不一致性存在。network反应的是网状meta分析的最终结果。
6. 概率排序
#rank.probability
#preferredDirection
#fixed moel
ranks_b_bin_fe <- rank.probability(mcmc_b_bin_fe, preferredDirection = -1)
print(ranks_b_bin_fe)
plot(ranks_b_bin_fe, beside=TRUE)
#random moel
ranks_b_bin_re <- rank.probability(mcmc_b_bin_re, preferredDirection = -1)
print(ranks_b_bin_re)
plot(ranks_b_bin_re, beside=TRUE)
在这里preferredDirection设置成-1是因为效应量(effect size)比参照组小意味着更好的疗效。另外mcmc_b_bin_fe这个文件是在上一期的内容中就已经创建好的,大家可以查阅往期内容
网状Meta分析之R语言‘gemtc’包实战(2)
。
从结果可以看出,疗效最好的是E,接下来依次为C,B,D,A。其中A是安慰剂。
好了,以上就是使用‘gemtc’包进行网状Meta分析的最后一部分内容,希望大家能喜欢!有问题欢迎在留言区进行讨论。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有