I am using lme4 to fit a mixed effects model to my data. I have a
significant interaction between two variables. My question is what
is the correct way to get p-values for single terms involved in that
interaction. I have been using stepwise backwards deletion and
model comparisons to get p-values,and refitting the model using a
REML approach to get estimates.However, presumably to get the p
values for single terms, I also have to remove the interaction as
well, and therefore inaccurate. I have confused myself with this
now, as to whether in this case you should compare a model with the
interaction and the single term of interest removed to the minimum
adequate model (in which case the p values are over inflated for the
single terms), or whether to remove the interaction from the minimum
adequate model, and then compare this to an updated model, with the
single term removed.
This is an example of what the model would look like:
library(lme4)
minadequatemodel<-lmer(sq_rate~(day+temp+
brood_size+weight+weight:brood_size+(1|ident),data=prov,REML=FALSE)
##to get p values for e.g. temp
pvalmodtemp<-update(minadequatemodel,~.+temp)
anova(modelfin,modeltemp)
###but what's the correct way to get p value for brood_size or weight?
Your help would be greatly appreciated...thanks!