Hi R users, I google the website and I found that there are three ways to perform repeated measure ANOVA: aov, lme and lmer. http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg58502.html But the questions are which one is good to use and how to do post-hoc test? I use the example that is provided in the above link and I try> tt<-aov(p.pa~group*time+Error(subject/time),data=P.PA) > TukeyHSD(tt)Error in UseMethod("TukeyHSD") : no applicable method for "TukeyHSD" Any suggestions? Appreciate in advance~ Chunhao
Hi Chunhao,>> I google the website and I found that there are three ways to perform >> repeated measure ANOVA: aov, lme and lmer.It's also a good idea to search through the archives.>> I use the example that is provided in the above link and I try >> > tt<-aov(p.pa~group*time+Error(subject/time),data=P.PA) >> > TukeyHSD(tt) >> Error in UseMethod("TukeyHSD") : no applicable method for "TukeyHSD"Because of ... + Error(). See the following thread, where this is answered: http://www.nabble.com/Tukey-HSD-(or-other-post-hoc-tests)-following-repeated-measures-ANOVA-td17508294.html#a17559307 HTH, Mark. ctu wrote:> > Hi R users, > I google the website and I found that there are three ways to perform > repeated measure ANOVA: aov, lme and lmer. > http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg58502.html > But the questions are which one is good to use and how to do post-hoc > test? > > I use the example that is provided in the above link and I try >> tt<-aov(p.pa~group*time+Error(subject/time),data=P.PA) >> TukeyHSD(tt) > Error in UseMethod("TukeyHSD") : no applicable method for "TukeyHSD" > > Any suggestions? > > Appreciate in advance~ > Chunhao > > ______________________________________________ > R-help at 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. > >-- View this message in context: http://www.nabble.com/Repeated-Measure-ANOVA-Old-question-tp18726146p18726722.html Sent from the R help mailing list archive at Nabble.com.
Tank you (Anna & Mark) very much for this super information Let me confirm that IF I want to perform the RM-ANOVA I should use "lmer" and perform the post-hoc test by using "glht", right? Because I am not so familiar with "lmer" so I have two more questions. Let me use that following example again, 1. Is the random effect statement correct? if no what will be? 2. What did I do wrong in glht? require(lme4);require(nlme) group <-rep(rep(1:2, c(5,5)), 3);time <-rep(1:3, rep(10,3));subject <- rep(1:10,3) p.pa <- c(92, 44, 49, 52, 41, 34, 32, 65, 47, 58, 94, 82, 48, 60, 47, 46, 41, 73, 60, 69, 95, 53, 44, 66, 62, 46, 53, 73, 84, 79) P.PA <- data.frame(subject, group, time, p.pa) P.PA$group=factor(P.PA$group);P.PA$time=factor(P.PA$time) P.PA$subject=factor(P.PA$subject) tlmer<-lmer (p.pa ~ time * group + (time*group | subject), data=P.PA )> summary(glht(tlmer,linfct=mcp(group="Tukey")))Error in UseMethod("fixef") : no applicable method for "fixef" In addition: Warning message Thank you very much Chunhao
Possibly Parallel Threads
- Mixed effects model where nested factor is not the repeated across treatments lme???
- Is using glht with "Tukey" for lme post-hoc comparisons an appropriate substitute to TukeyHSD?
- TukeyHSD plot error
- multiple comparisons/tukey kramer
- Multiple comparisons for a two-factor ANCOVA