Interestingly, if I fitted the model using glm() rather than lm(), drop1() would behave as expected:

summary(model.glm <- glm(y ~ ., data = sim.set, family = 'gaussian'))
summary(model.lm <- lm(y ~ ., data = sim.set))
drop1(model.glm, test = 'F')
drop1(model.lm, test = 'F')
model.glm <- step(model.glm, direction = 'both', test = 'F')
model.lm <- step(model.lm, direction = 'both', test = 'F')
summary(model.glm)
summary(model.lm)

Although it is debatable whether one should use glm(family = 'gaussian') rather than lm() for fitting models with normal distribution residuals. This raises the suspicion that there could be a bug in drop1() and step(), which I think uses add1() and drop1() repeatedly.


Thomas P C Chu
________________________________________________________________________
AOL Email goes Mobile! You can now read your AOL Emails whilst on the move. Sign up for a free AOL Email account with unlimited storage today.



**************************************
See what's new at http://www.aol.com

______________________________________________
R-help@r-project.org mailing list
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