[R] AIC in glm.fit with intercept

From: Luke <jyzz88_at_gmail.com>
Date: Thu 16 Jun 2005 - 13:18:08 EST


Dear R users,

glm.fit() gave me the same AIC's regardless of TRUE or FALSE intercept option.

> myX <- as.matrix(1:10)
> myY <- 3+5*myX
> foo <- glm.fit(x=myX, y=myY, family = gaussian(link = "identity"), intercept=TRUE)
> foo$aic

[1] 38.94657
> foo <- glm.fit(x=myX, y=myY, family = gaussian(link = "identity"), intercept=FALSE)
> foo$aic

[1] 38.94657

Is my code wrong or is it a bug in glm.fit?

-Luke



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 16 13:25:56 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:43 EST