简体   繁体   English

从子组的输出中提取元分析估计和置信区间

[英]Extract Meta-Analysis Estimate and Confidence Interval from output for subgroups

I am trying to do almost exactly this thing: Extracting meta analysis estimate and CI from output in R我正在尝试做几乎完全相同的事情: 从 R 中的输出中提取元分析估计和 CI

I have metaprop output, and I'd like to extract the confidence interval estimates to put into a dataframe so I can add them to my graph here: Forest Plot, ordering and summarizing multiple variables As a line for summary data.我有 metaprop 输出,我想提取置信区间估计值以放入数据帧,以便我可以将它们添加到我的图表中: 森林图,排序和汇总多个变量作为汇总数据的一行。

I've used the double arcsine transformation and so the code listed in that first answer works perfectly if I'd like to get the esimate and CI for the plot as a whole, but I have subgroups.我使用了双反正弦变换,因此如果我想获得整个图的估计和 CI,那么第一个答案中列出的代码可以完美运行,但我有子组。 So how would I extract the numbers in green in the photo below, not the red one?那么我如何提取下面照片中的绿色数字,而不是红色数字? 在此处输入图片说明

Edit: Update with more information, so per the SE question cited above, you do:编辑:更新更多信息,因此根据上面引用的 SE 问题,您可以:

random.est2 <- c(pes.summary$TE.random,pes.summary$lower.random,pes.summary$upper.random)
unlist(lapply(random.est2, meta:::backtransf,  sm="PFT",  n=1/mean(1/pes.summary$n)))

To get the information out for the entire thing.获取整个事件的信息。 Ie that code above gives me 0.988492 [0.976040, 0.997163].即上面的代码给了我 0.988492 [0.976040, 0.997163]。 These numbers line up perfectly with whats in the red square in the photo.这些数字与照片中红色方块中的数字完美对齐。 And so its the "TE.Random" object that you extract for that.所以它是您为此提取的“TE.Random”对象。 Well... per the documention for metaprop, "Te.Random.w" should be the estimated treatment effect for the subgroups.嗯……根据 metaprop 的文档,“Te.Random.w”应该是亚组的估计治疗效果。 So I figured I'd do the same code as above for the subgroups and tried:所以我想我会对子组执行与上面相同的代码并尝试:

random.est2 <- c(pes.summary$TE.random.w,pes.summary$lower.random.w,pes.summary$upper.random.w)
unlist(lapply(random.est2, meta:::backtransf,  sm="PFT",  n=1/mean(1/pes.summary$n)))

But this gives me numbers that are roughly .01 off of what they should be.但这给了我大约 0.01 的数字,它们应该是。 So I'm assuming maybe I'm backtransforming them incorrectly?所以我假设我可能错误地对它们进行了反向转换?

Lastly, there seems to be an n.harmonic.mean.w which is: "Harmonic mean of number of observations in subgroups (for back transformation of Freeman-Tukey Double arcsine transformation) - if byvar is not missing."最后,似乎有一个 n.harmonic.mean.w 是:“子组中观测值的谐波平均值(用于 Freeman-Tukey 双反正弦变换的反向变换) - 如果 byvar 没有丢失。”

That sounds even more like what I should use, but I can't get that to work either.这听起来更像是我应该使用的,但我也无法让它发挥作用。

Try this.尝试这个。

library(metafor)

Estimate<-transf.ipft(pes.summary$TE.random.w,ni=pes.summary$n.harmonic.mean.w)
Upper<-transf.ipft(pes.summary$lower.random.w,ni=pes.summary$n.harmonic.mean.w)
Lower<-transf.ipft(pes.summary$upper.random.w,ni=pes.summary$n.harmonic.mean.w)


new.df<-data.frame(Estimate,Upper,Lower)

For more information, see https://www.researchgate.net/publication/325486099_How_to_Conduct_a_Meta-Analysis_of_Proportions_in_R_A_Comprehensive_Tutorial有关更多信息,请参阅https://www.researchgate.net/publication/325486099_How_to_Conduct_a_Meta-Analysis_of_Proportions_in_R_A_Comprehensive_Tutorial

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM