Karl, Thank you for this interesting challenge. It turns out to be reasonably straightforward. This code does it for the first example in ?MMC.
## This example is based on the example in ?HH:::MMC library(HH) ## pairwise comparisons data(catalystm) ## A. individual plots ## base graphics box plot boxplot(concent ~ catalyst, data=catalystm, xlab="catalyst", ylab="concentration", las=1) ## aov catalystm1.aov <- aov(concent ~ catalyst, data=catalystm) summary(catalystm1.aov) ## MMC plot old.omd <- par(omd=c(0,.95,0,1)) catalystm.mmc <- mmc(catalystm1.aov, linfct = mcp(catalyst = "Tukey")) catalystm.mmc plot(catalystm.mmc, ry=c(50,58), x.offset=1.8) ## tiebreaker plot plotMatchMMC(catalystm.mmc$mca, xlabel.print=FALSE) ## B. coordinate scales of all three plots by adjusting par values and ## the frame sizes def.par <- par(no.readonly = TRUE) # save default, for resetting... ## allocate figure 1 the right 2/3 and top 2/3 of the plotting region ## allocate figure 2 the right 2/3 and bottom 1/3 of the plotting region ## allocate figure 3 the left 1/3 and top 2/3 of the plotting region frame() layout(matrix(c(3,1, 0,2), 2, 2, byrow = TRUE), widths=c(1,2), heights=c(2,1)) ## show the regions that have been allocated to each plot layout.show(3) omd.old <- par(omd=c(0,.95,0,1)) plot(catalystm.mmc, ry=c(50,59), x.offset=1.8) usr.mmc <- par()$usr mar.old <- par(mar=c(5,4,0,2)+.1) plotMatchMMC(catalystm.mmc$mca, xlabel.print=FALSE) par(mar.old) boxplot(concent ~ catalyst, data=catalystm, xlab="catalyst", ylab="concentration", las=1, ylim=usr.mmc[3:4], yaxs="i") ## If you have a set of plots that don't fit comfortably into the ## space illustrated here, then you will need to increase the plotting ## device window from the default 7in x 7in because the cex is ## hardwired into the plot.mmc.multicomp function. On Mon, Jan 14, 2013 at 6:37 PM, Richard M. Heiberger <r...@temple.edu>wrote: > When the group means are close together, the labels will overlap. > This overlap is actually informative, indicating that the groups are close. > For this common case, we provide the tiebreaker function > > matchMMC > > which is also documented and illustrated on the ?MMC page. > > I have never tried to put the data on the same scale. It "should" be easy. > Let me try, and then post an example. > > Rich > > > On Mon, Jan 14, 2013 at 3:53 PM, Karl Ove Hufthammer <k...@huftis.org>wrote: > >> må. den 14. 01. 2013 klokka 13.58 (-0500) skreiv Richard M. Heiberger: >> > Please look at the MMC (Mean-mean Multiple Comparisons) plot in the HH >> > package. It displays both the means and the differences. >> > >> > install.packages("HH") ## if you don't already have it. >> > library(HH) >> > ?MMC >> >> Thanks for the suggestion. Thats a very interesting and clever way of >> displaying both means and differences. Its not what I was looking for, >> though, as it doesnt display the actual data. >> >> For the record, heres the syntax for using MMC on the dataset mentioned >> in my original posting: >> >> l.mmc=mmc(l, linfct = mcp(trt = "Tukey")) >> plot(l.mmc) >> >> (It looks best on data where the group means arent very close; >> otherwise the labels might overlap.) >> >> -- >> Karl Ove Hufthammer >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.