R-help:

I am trying to decide between using a multiple linear regression or a linear 
mixed effects model for my data:


model1 <- lm (responsevariable ~ predictor1 + predictor2 + predictor3 + 
predictor4, data= data)

model2 <- lme (responsevariable ~ predictor1 + predictor2 + predictor3 + 
predictor4, random = ~1 | site, data= data)


anova (model1, model2)


but I keep getting the following error code:

Error in anova.lmlist (object, ...):

    models were not all fitted to the same size of dataset


Any advice would be appreciated, thanks.



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to