# [S] more powerful model without intercept?

Lutz Prechelt (prechelt@ira.uka.de)
Wed, 18 Mar 1998 19:13:40 +0100

Dear fellow Sers,

can somebody please explain the following effect:

> summary(fit _ lm(time ~ expect+AP+sess+prg+subtask+langsN+oomethN+
log(cpp+1), data=d))\$r.squared
[1] 0.5015439
log(cpp+1)-1, data=d))\$r.squared
[1] 0.8114594

The only difference between the models is that the second one
must do WITHOUT an intercept.
How can it possibly be (so much) better?

Is this a bug?
Or else what does it mean?
I am running Version 3.4 Release 1 on SunOS 5.5

(Actually, the fits look pretty much the same and I don't
believe 0.8 variance explained at all.
The only thing I have found is this:
'AP' and 'sess' are both factors with two levels.
In 'fit' there is one coefficient for each
In 'fit2' there is one coefficient for 'sess' but two for 'AP'.
(In general: two for whichever predictor comes first in the formula?)
Why?
)

I append fit and fit2 below.

Lutz

Lutz Prechelt http://wwwipd.ira.uka.de/~prechelt/ | Whenever you
Institut f. Programmstrukturen und Datenorganisation | complicate things,
Universitaet Karlsruhe; D-76128 Karlsruhe; Germany | they get
(Phone: +49/721/608-4068, FAX: +49/721/608-7343) | less simple.
>>> Ever had negative research results? http://wwwipd.ira.uka.de/fnr <<<

> fit
Call:
lm(formula = time ~ expect + AP + sess + prg + subtask + langsN + oomethN + log(
cpp + 1), data = d)

Coefficients:
(Intercept) expect AP sess prg1 prg2 prg3
18.44279 3.358113 -0.0879129 2.682832 -3.59256 0.2832499 -1.475016
-9.067859 -3.685227 1.72993 -0.8013938 -0.9269213

Degrees of freedom: 261 total; 249 residual
Residual standard error: 10.87827
> fit2
Call:
lm(formula = time ~ expect + AP + sess + prg + subtask + langsN + oomethN + log(
cpp + 1) - 1, data = d)

Coefficients:
expect APALT APPAT sess prg1 prg2 prg3 subtask1
3.358113 18.53071 18.35488 2.682832 -3.59256 0.2832499 -1.475016 -9.067859
subtask2 langsN oomethN log(cpp + 1)
-3.685227 1.72993 -0.8013938 -0.9269213

Degrees of freedom: 261 total; 249 residual
Residual standard error: 10.87827

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news