[R] glm with four variables
John Fox
jfox at mcmaster.ca
Fri Feb 8 14:29:40 CET 2002
Dear Iago,
At 11:26 AM 2/8/2002 +0000, iago mosqueira wrote:
>Sorry if this is a very basic question, but when I run this
>
>glm(formula = loge ~ lat + ne + dep, family = gaussian)
>
>summary shows the same formula but results only for the first two variables.
>What am I doing wrong?
It's hard to know the source of your problem without some more details, but
a good guess is that dep is perfectly collinear with lat and ne. In this
case, printing the model will give NA for the coefficient of dep, but
summary will suppress the coefficient.
More generally, one would normally use lm rather than glm to fit a linear
model. This would produce the same result, but the summary method for lm
warns of collinearity.
I hope that this helps,
John
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list