I am trying to plot a large set of multiple comparison data from a csv file. I used to do in the following manner, but its giving me an error now, and I am not sure what correct. I have put the data in the code using the output from dput for completeness. Can anyone help me with my mistakes? Thanks library(multicomp) library(mvtnorm) sig.data<-structure(list(X = structure(c(1L, 2L, 4L, 3L, 5L, 6L), .Label = c("100nM - 1000nM", "10nM - 1000nM", "10nM - 100nM", "1nM - 1000nM", "1nM - 100nM", "1nM - 10nM"), class = "factor"), Estimate = c(-0.1909671012, -1.1180593892, -1.5985194558, -0.927092288, -1.4075523546, -0.4804600666 ), lwr = c(-4.61934161589573, -5.54643390389573, -6.02689397049573, -5.35546680269573, -5.83592686929573, -4.90883458129573), upr = c(4.23740741349573, 3.31031512549573, 2.82985505889574, 3.50128222669574, 3.02082216009574, 3.94791444809573), p.value = c(0.99851988940783, 0.790494603062747, 0.560121081996702, 0.866988985920687, 0.654497292526087, 0.977795552525069 )), .Names = c("X", "Estimate", "lwr", "upr", "p.value"), class = "data.frame", row.names = c("100nM - 1000nM", "10nM - 1000nM", "1nM - 1000nM", "10nM - 100nM", "1nM - 100nM", "1nM - 10nM")) rownames(sig.data)<-sig.data[,1] my.hmtest <- structure(list( Estimate = t(t(structure(sig.data[,"Estimate"], .Names = rownames(sig.data)))), conf.int = sig.data[,3:4], ctype = "ABCG1-0490"), class = "hmtest") plot(my.hmtest)
The multicomp package was replaced about a year ago with the multcomp package. Your sig.data can be plotted with the multcomp package with the following code. require(multcomp) tmp <- list(confint=sig.data) attr(tmp, "type") <- "none" old.oma <- par(oma=c(0,1,0,0)) multcomp:::plot.confint.glht(tmp) par(old.oma) You will get more control if you start with your aov object, rather than the derived sig.data object that you posted.
Thanks, multicomp was a typo in the code I put in the email. I am using multcomp. I did not understand the line attr(tmp, "type")<-"none" what is it doing? I looked up type under arguments, which mentions it as multiplicity adjustment to be applied. Does the statement say no adjustments to be applied or does it have to do with attributes typeof? I would appreciate if you could clarify this for me. Thanks. Cheers../Murli -----Original Message----- From: Richard M. Heiberger [mailto:rmh at temple.edu] Sent: Wednesday, October 24, 2007 12:34 AM To: Nair, Murlidharan T; r-help at r-project.org Subject: RE: [R] multicomp plotting The multicomp package was replaced about a year ago with the multcomp package. Your sig.data can be plotted with the multcomp package with the following code. require(multcomp) tmp <- list(confint=sig.data) attr(tmp, "type") <- "none" old.oma <- par(oma=c(0,1,0,0)) multcomp:::plot.confint.glht(tmp) par(old.oma) You will get more control if you start with your aov object, rather than the derived sig.data object that you posted.