What question are you trying to answer?  That is what you need to decide first.  In the no-intercept model you can test if the slope is non-zero, but you probably already know the answer without needing data or a test (unless most the y values are around 0 as well (both sides) and the science says that the slope could be 0 or non-0).

Why do you think the intercept is 0 to start?  what scientific question is of interest from the data?

________________________________
From: Michael Just [mgjust@gmail.com]
Sent: Monday, October 13, 2008 8:49 PM
To: Greg Snow
Cc: Rolf Turner; r-help
Subject: Re: [R] LM intercept

Greg,
I will not be using categorical variables. That sample code I provided was from lm help. All of my variables are real numbers. The no intercept model, testing all means equal to zero, seems less informative then testing whether the means are equal to each other, in the intercept included model. How do I then interpret or use the "(intercept)" values (estimate, std.error, t value, pr (>|t|)) from my lm?

Thanks so much for this information,
Michael

On Mon, Oct 13, 2008 at 9:36 PM, Greg Snow <Greg.Snow@imail.org<mailto:Greg.Snow@imail.org>> wrote:
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-intercept 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: r-help-bounces@r-project.org<mailto:r-help-bounces@r-project.org> [r-help-bounces@r-project.org<mailto:r-help-bounces@r-project.org>] On Behalf Of Michael Just [mgjust@gmail.com<mailto:mgjust@gmail.com>]
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 <r.turner@auckland.ac.nz<mailto:r.turner@auckland.ac.nz>>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<http://www.marshalsoftware.com>
> ######################################################################
>

       [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org<mailto: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.


	[[alternative HTML version deleted]]

