Question

I'm using the following code to try to get at post-hoc comparisons for my cell means:

result.lme3<-lme(Response~Pressure*Treatment*Gender*Group, mydata, ~1|Subject/Pressure/Treatment)
aov.result<-aov(result.lme3, mydata)
TukeyHSD(aov.result, "Pressure:Treatment:Gender:Group")

This gives me a result, but most of the adjusted p-values are incredibly small - so I'm not convinced the result is correct.

Alternatively I'm trying this:

summary(glht(result.lme3,linfct=mcp(????="Tukey")

I don't know how to get the Pressure:Treatment:Gender:Group in the glht code.

Help is appreciated - even if it is just a link to a question I didn't find previously.

I have 504 observations, Pressure has 4 levels and is repeated in each subject, Treatment has 2 levels and is repeated in each subject, Group has 3 levels, and Gender is obvious.

Thanks

No correct solution

OTHER TIPS

I solved a similar problem creating a interaction dummy variable using interaction() function which contains all combinations of the leves of your 4 variables.

I made many tests, the estimates shown for the various levels of this variable show the joint effect of the active levels plus the interaction effect.

For example if:

temperature ~ interaction(infection(y/n), acetaminophen(y/n))

(i put the possible leves in the parenthesis for clarity) the interaction var will have a level like "infection.y:acetaminophen.y" which show the effect on temperature of both infection, acetaminophen and the interaction of the two in comparison with the intercept (where both variables are n).

Instead if the model was:

temperature ~ infection(y/n) * acetaminophen(y/n)

to have the same coefficient for the case when both vars are y, you would have had to add the two simple effect plus the interaction effect. The result is the same but i prefer using interaction since is more clean and elegant.

The in glht you use:

summary(glht(model, linfct= mcp(interaction_var = 'Tukey'))

to achieve your post-hoc, where interaction_var <- interaction(infection, acetaminophen).

TO BE NOTED: i never tested this methodology with nested and mixed models so beware!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top