I'm doing repeated measurements ANOVA in R with libraries:
library(ordinal)
library(car)
library(RVAideMemoire)
I have two groups: months and distance and the dependent variable is CO2:
distance month CO2
0 metres july 234
I've made a clmm model for CO2 explained by distance, month and interaction betwee month and distance:
model_CO2 = clmm(CO2.f ~ month + distance + month:distance + (1|nest),
data = field_data,
threshold = "equidistant")
The results show that both month and distance are significan, but not there interaction. Now, I want to perform a Tukey test with this information, so my idea is to perform a Tukey test for each factor separatedly.
My question is:
Do I have to make another model, where I separate each factor? Or can I just perform the Tukey test using the model I created but only considering one factor?
Example:
Using the initial model:
library(emmeans)
library(lsmeans)
Tmonth = lsmeans(model_CO2,
~ month)
multcomp::cld(Tmonth,
alpha = 0.05,
Letters = letters,
adjust = "tukey")
Creating a new model only for month and then performing a Tukey test:
model_CO2m = clmm(CO2.f ~ month + (1|nest),
data = field_data,
threshold = "equidistant")
Tmonth = lsmeans(model_CO2m,
~ month)
multcomp::cld(Tmonth,
alpha = 0.05,
Letters = letters,
adjust = "tukey")
Thanks in advance!
I think some people would recommend that you do. But no, you don't have to, in that the estimated marginal means that you are comparing are well-defined; the interaction effects are just averaged over.
I would recommend that you plot the estimates for the factor combinations, though -- using emmip()
for example -- so that you clearly understand what the estimates are that are being averaged.
I just noticed in the question that you took a factor completely out of the model. I definitely recommend against doing that. Each factor contributes a significant main effect, so they both belong in the model. If you are to consider a reduced model here, only consider the one with both main effects but no interaction.