One clarification: If groups is a numeric variable, then dropping the intercept forces it to 0 and therefore fits a line that goes through the origin, but if group is categorical (which seems likely with a name like group), then while it forces the intercept to 0, the dummy variable encoding steals the freed up degree of freedom and fits a full set of variables. What effect this has depends on what question you are trying to answer. The degrees of freedom of the 2 models and the predicted values of the 2 models will be identical (so full-reduced tests will result in 0/0 but with a limit of 0 giving a p-value of 1.0). The coefficients for the intercept model (assuming default treatment contrasts) measure the difference between each level of group and the reference (first) level. In the no-intercept model, the coefficients measure the mean of each group (cell means model). The overall F-test in the intercept case tests the null that all group means are equal. The F test for the non-interce! pt model tests the null that all the means equal 0 (can be a very different test).
So if you are looking at predicted values, the -1 makes no difference at all, if you are looking at the F test then dropping the intercept can make a major change of what question is being answered. Hope this helps, ________________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Michael Just [EMAIL PROTECTED] Sent: Monday, October 13, 2008 2:59 PM To: Rolf Turner Cc: r-help Subject: Re: [R] LM intercept Great, Thanks, Michael On Mon, Oct 13, 2008 at 3:56 PM, Rolf Turner <[EMAIL PROTECTED]>wrote: > > On 14/10/2008, at 9:42 AM, Michael Just wrote: > > What is the difference when including or not including the intercept when >> using lm()? >> >> x.noint <- lm(weight ~ group - 1))# omitting intercept >> x <- lm(weight ~ group)) >> >> This has nothing to do with forcing the intercept to 0, correct? >> > > On the contrary. This is *exactly* what it means. > > cheers, > > Rolf Turner > > ###################################################################### > Attention:This e-mail message is privileged and confidential. If you are > not theintended recipient please delete the message and notify the > sender.Any views or opinions presented are solely those of the author. > > This e-mail has been scanned and cleared by MailMarshal > www.marshalsoftware.com > ###################################################################### > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.