On 02 Apr 2007, at 04:40, Richard M. Heiberger wrote:
I would like to obtain for each factor of my anova model the "response variable vs factor" plot with means and 95% Tukey HSD intervals.I believe you are asking for the multiple comparisons plots from the multcomp package.
library(multcomp)
### multiple comparison procedures
### set up a one-way ANOVA
amod <- aov(breaks ~ tension, data = warpbreaks)
warp.pairwise <- glht(amod, linfct = mcp(tension = "Means"))
confint(warp.pairwise)
plot(warp.pairwise)
Dear Dr. Heiberger,thank you for your help. Following the example above I was able to test the independence of each factors in my anova analysis.
My anova model is built in a way similar to this:myObj.aov <- aov(response~(factor1+factor2+factor2+factor4+factor5) ^2,data=myDataFrame)
I used the code below for each factor of my model: myObj.pairwise <- glht(myObj.aov, linfct=mcp(factor1="Means")) confint(myObj.pairwise) plot(myObj.pairwise)
I recommend the MMC (Mean-mean Multiple Comparison) plot that includesboth sets of information, pairwise comparisons and individual means, andalso allows arbitrary contrasts. library(HH) warp.mmc <- glht.mmc(amod, linfct = mcp(tension = "Tukey")) warp.mmc plot(warp.mmc)
Unluckly, I was not able to try this last example on my own data. If I use the following line of code, I obtain an error myObj.mmc <- glht.mmc(myObj.aov, linfct=mcp(factor1="Tukey")) > Error in means %*% abs(lmat.factor) : non -conformable arguments Thank you for your help. Cheers -------------------------------------------------------------------- Max MANFRIN Tel.: +32 (0)2 650 3168 IRIDIA - CoDE, CP 194/6 Fax.: +32 (0)2 650 2715 Université Libre de Bruxelles Av. F. D. Roosevelt, 50 1050 Brussels Email: [EMAIL PROTECTED] BELGIUM WWW: http://iridia.ulb.ac.be/~mmanfrin gpg DSA: 0x7E67B4C4 gpg fingerprint: C2E9 1689 CADD 7CAE 2FAB A355 8FD9 9DD1 7E67 B4C4 --------------------------------------------------------------------
PGP.sig
Description: This is a digitally signed message part
______________________________________________ [email protected] 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.
