【问题标题】:Plotting of multiple comparisons?绘制多重比较?
【发布时间】:2010-02-18 03:22:47
【问题描述】:

当人们希望比较(测试)多个组时(例如,在进行方差分析时就是这种情况),就会面临多重比较的问题。如果我们希望进行比较,这同样适用。

因此,我的问题是,您知道哪些工具(在 R 中)可以进行反映多重比较的绘图?

目前,我只知道两个(虽然我确信还有更多):

  1. TukeyHSD( ) 与 plot( ) 结合
  2. 箱线图选择“缺口”的方式

【问题讨论】:

    标签: r comparison plot


    【解决方案1】:

    multcomp 具有例如plot.cld() -- 你可以试试

    library(multcomp)
    example(plot.cld)
    

    此外,在http://rseek.org 进行快速“多重比较图”搜索会显示更多包和任务视图。

    【讨论】:

    • 谢谢德克。我给他们看看。
    【解决方案2】:

    在 GLM 中有一些用于多重比较的方法

    http://www.r-bloggers.com/multiple-comparisons-for-glmms-using-glmer-glht/

    R-Project Handbook of Statistical Analyses(网站)中有一篇关于同时推理的文章...

    http://cran.r-project.org/web/packages/HSAUR2/vignettes/Ch_simultaneous_inference.pdf

    plotmeans() 来自 gplot 包。这包括置信区间。

    然后是包“psych”的error.bars.by()函数。从数据帧中按组绘制均值和 SD。

    有些使用密度图进行可视化。

    # Compare MPG distributions for cars with 
    # 4,6, or 8 cylinders
    library(sm)
    attach(mtcars)
    
    # create value labels 
    cyl.f <- factor(cyl, levels= c(4,6,8),
      labels = c("4 cylinder", "6 cylinder", "8 cylinder")) 
    
    # plot densities 
    sm.density.compare(mpg, cyl, xlab="Miles Per Gallon")
    title(main="MPG Distribution by Car Cylinders")
    
    # add legend via mouse click
    colfill<-c(2:(2+length(levels(cyl.f)))) 
    legend(locator(1), levels(cyl.f), fill=colfill)
    

    【讨论】:

      猜你喜欢
      • 2021-08-04
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      • 2011-07-18
      • 1970-01-01
      • 2021-05-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多