Hi, 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? iago -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 08-Feb-2002 iago mosqueira wrote:> Hi, > > 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?Probably dep is aliased: i.e. some linear combination of lat, ne and the intercept equals dep for all values. A model with all four terms is, in this case, unidentifiable so dep is dropped. This appears to take place silently. It might be more useful to issue a warning. Martyn -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._