I was working with R version 3.6.3 and recently updated to version 4.0.3. I have given an example of the model I am working on.
Model0 <- lmer(accuracy~Temperature+Relative_Humidity+scaledweek+(1 | pxids),data=ptrails.df)
Model1 <- lmer(accuracy~CO+Temperature+Relative_Humidity+scaledweek+(1 | pxids),data=ptrails.df)
Model2 <- lmer(accuracy~pm10+Temperature+Relative_Humidity+scaledweek+(1 | pxids),data=ptrails.df)
Model3 <- lmer(accuracy~NO+Temperature+Relative_Humidity+scaledweek+(1 | pxids),data=ptrails.df)
anova(Model0,Model1,Model2, Model3)
The idea is for each model to compare with the base model (Model0
) to determine which variable has a significant effect.
Example of output:
I do not get the p-value for Model2 and Model3. This wasn't the case in the previous version. I tried to compare model0 with model1 and then model0 with model2 etc. such comparisons give me the p-value however, I have very large data, I would need to do it together.
question from:
https://stackoverflow.com/questions/65905142/in-r-version-4-anova-fails-to-compare-linear-mixed-regression-base-model-to-oth 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…