【问题标题】:How to incorporate "weighted study" into plot graph如何将“加权研究”纳入绘图图中
【发布时间】:2012-09-28 08:40:53
【问题描述】:

我的数据是从文献中收集的,用于荟萃分析:

 Study      Eeff        Neff   Weight (%)
    1   34.83181476 50.04959144 0.1
    1   33.76824264 49.53210571 0.1
    1   32.67390287 47.77214774 0.1
    1   33.05520666 47.30254996 0.1
    2   33.19730252 44.21602149 0.3
    2   34.04709188 44.48002926 0.3
    3   33.22501606 38.96770954 0.3
    3   33.80766289 41.66974683 0.3
    3   33.06675158 42.66282841 0.3
    3   32.43069645 37.06958147 0.3
    4   34.72367611 41.31151977 0.25
    4   33.93254846 43.8526145  0.25
    4   33.22982756 44.99923374 0.25
    4   32.85979541 46.35648939 0.25
    5   32.85979541 43.53737788 0.35
    5   32.85979541 44.16612955 0.35
    5   32.85979541 40.10215682 0.35
    5   32.85979541 39.05910344 0.35

我有 EeffNeff 来自 5 项研究。首先,我通常在EeffNeff 之间绘制散点图。然而,由于数据来自不同的研究,其中不同的样本量、实验条件……我通过“逆方差”对研究进行加权,即方差越大,权重越小。总重量为 100%(或 1)。 我想制作一个新的散点图,其中可以包含这个“重量”?有人可以帮帮我吗?

谢谢!

【问题讨论】:

    标签: r metadata lattice scatter-plot mixed-mode


    【解决方案1】:

    使用ggplot2,可以执行以下操作:

    require('ggplot2')
    aFile = read.table('yourdata.txt',header = T)     
    p=ggplot(aFile,aes(Eeff,Neff))
    p + geom_point(aes(colour = Weight,size = Weight))
    

    显然你会想玩颜色和标记大小等......

    【讨论】:

      猜你喜欢
      • 2013-10-27
      • 2015-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-04
      • 2017-05-28
      相关资源
      最近更新 更多