Dear list members,
I get the following error when using the glht function to perform a post hoc 
analysis for an ANOVA with repeated measures:


require(nlme)
lme_H2H_musicians = lme(H2H ~ Emotion*Material, data=musicians, random = 
~1|Subject)
require(multcomp)
summary(glht(lme_H2H_musicians, linfct=mcp(Type = "Tukey")), test = 
adjusted(type = "bonferroni"))
Error in mcp2matrix(model, linfct = linfct) : 
  Variable(s) 'Type' have been specified in 'linfct' but cannot be found in 
'model'! 



I don´t understand why I get this error, but at the same time I am not an 
expert at all of R.

I can give you some details more about the experimental design I use and what I 
want to do with the analysis, 
so maybe there is a problem with the model I am trying to use, and I need some 
advices.


I performed an experiment where some musicians had to walk with 5 different 
emotions 
(sad, tender, neutral, happy, aggressive) while listening to 4 types of
sounds (metal, wood, gravel, snow) and I want to see if the sound affects the 
walking pace.
I measured for each walk the average time between steps (H2H, i.e. heel-to-heel)
Each trial was repeated twice.

The table in .csv format can be downloaded here: 
https://dl.dropbox.com/u/3288659/Results_data_R.csv


The ANOVA that I performed before the post hoc test is the following:

aov_H2H_musicians = aov(H2H ~ Emotion*Material + 
Error(Subject/(Emotion*Material)), data=musicians)
summary(aov_H2H_musicians)




Thanks in advance

All the best  
        [[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.

Reply via email to