[R] LM intercept
p.dalgaard at biostat.ku.dk
Tue Oct 14 00:21:10 CEST 2008
Michael Just wrote:
> On Mon, Oct 13, 2008 at 3:56 PM, Rolf Turner <r.turner at 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.
But if group is a factor, this removes the intercept _and_ uses the full
set of indicator variables to represent the factor, so you end up with
the same model, just parametrized differently.
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help