0

I am trying to compare two nested models that have different number of participants so I keep getting an error message.

Error in anova.lmlist(object, ...) : models were not all fitted to the same size of dataset In addition: Warning message: In anova.lmlist(object, ...) : models with response ‘"NULL"’ removed because response differs from model 1

  • Is there a way of correcting this? The code I'm using is anova(fit1, fitall, data=RMS2_working) fit1 has 5 predictors and is df=352, fitall has 10 predictors and 358 degrees of freedom

Thank you!

Ale
  • 946
  • 4
  • 17
  • 28
  • Please tag this post with the language that you're using – bendl Oct 30 '17 at 13:50
  • 1
    Welcome to StackOverflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – Sotos Oct 30 '17 at 15:12
  • 2
    The easy way would be to fit your models to the same subset of data. – Gregor Thomas Oct 30 '17 at 15:13
  • https://stackoverflow.com/questions/18387258/r-error-which-says-models-were-not-all-fitted-to-the-same-size-of-dataset – Ben Bolker Oct 30 '17 at 15:26

0 Answers0