1

I have a data frame with this structure:

'data.frame':   39 obs. of  3 variables:
 $ topic   : Factor w/ 13 levels "Acido Folico",..: 1 2 3 4 5 6 7 8 9 10 ...
 $ variable: Factor w/ 3 levels "Both","Preconception",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ value   : int  14 1 36 17 5 9 19 9 19 25 ...

and I want to test the effect value ~ variable, considering that observation are grouped in topics. So I thought to use a repeated measure ANOVA, where "variable" is considered as a repeatead measure on every topic. the call is aov(value ~ variable + Error(topic/variable)).

Up to this everything's ok.

Then I wanted to perform a post-hoc test with glht(model, linfct= mcp(variable = 'Tukey')), but I receive two errors:

‘glht’ does not support objects of class ‘aovlist’ no ‘model.matrix’ method for ‘model’ found! Since, taking out the error term solve the error I suppose that is the problem.

So, how can I perform a post-hoc test over a repeated measure anova?

Thanks!

Cyrus Mohammadian
  • 4,982
  • 6
  • 33
  • 62
Bakaburg
  • 3,165
  • 4
  • 32
  • 64
  • 2
    This question appears to be off-topic because it is about choosing an appropriate statistical method, and not about a specific programming question. – MrFlick Jun 15 '14 at 16:58
  • 1
    funny, a similar question was deemed off topic on CrossValidated and moved here! Anyway, this is not about theory but about the implementation of glht() – Bakaburg Jun 15 '14 at 22:46
  • It was unclear to me if your question is about specifically getting the `glht` function to work, or if there is any statistically valid method to run post-hoc tests over repeated measure anova. If the question is just about `glht`, then please edit your question to include a complete [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – MrFlick Jun 15 '14 at 22:59
  • 1
    Actually any model made with aov and containing an Error term, produce this error in glht. – Bakaburg Jun 16 '14 at 21:30

0 Answers0