On Thu, 2005-06-16 at 07:06 +0100, Prof Brian Ripley wrote: > What is the bug? > > This is the same model: the `intercept' term affects the null model, not > the actual model. Just look at all the output.
I think the documentation is misleading (On a related issue, it still refers to the defunct glm.fit.null() function). I'll fix it. Luke, you be using glm() instead of glm.fit(). > On Thu, 16 Jun 2005 [EMAIL PROTECTED] wrote: > > > 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 > ----------------------------------------------------------------------- This message and its attachments are strictly confidential. If you are not the intended recipient of this message, please immediately notify the sender and delete it. Since its integrity cannot be guaranteed, its content cannot involve the sender's responsibility. Any misuse, any disclosure or publication of its content, either whole or partial, is prohibited, exception made of formally approved use ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel