From jyzz88 at gmail.com  Thu Jun 16 05:42:27 2005
From: jyzz88 at gmail.com (jyzz88@gmail.com)
Date: Thu, 16 Jun 2005 05:42:27 +0200 (CEST)
Subject: [Rd] a bug in glm.fit() (PR#7947)
Message-ID: <20050616034227.77C02A1F9@slim.kubism.ku.dk>

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
>  AIC(lm(myY~0+myX, data=data.frame(myY,myX)))
[1] 38.94657
> AIC(lm(myY~1+myX, data=data.frame(myY,myX)))
[1] -650.9808

-Luke



[Rd] a bug in glm.fit() (PR#7947)
jyzz88@gmail.com