[R] Problem with lm
isabelle Zabalza-Mezghani
isabelle.zabalza-mezghani at ifp.fr
Thu Oct 26 10:22:25 CEST 2000
Hello Everybody,
I have a problem with the output of lm.
In fact, when I compare the R output and the Splus output, the results
appears to be different :
I have a dataframe with 5 factors , 16 rows and a response.
First, I tried to fit this response to a linear model :
lm(rep~(A+B+C+D+E),data).
The results beetween SPlus and R are different.
In a second time, I tried a new fit : lm(rep~(A+B+D+E+A:B),data).
The estimation of the main effects in the model are the same as the one
obtained for the first fit for Splus,
and are different for R.
Here an exemple :
On R: On Splus
lm(rep~(A+B+C+D+E),data) -> Intercept 12.6297
12.5573
A 0.0391 0.0195
B -0.0073 -0.0036
C 0.0443 0.0221
D -0.0321 -0.016
E -0.18887 -0.0944
lm(rep~(A+B+D+E+A:B),data) -> Intercept 12.7937
12.5573
A -0.2445 0.0195
B -0.2910 -0.0036
D -0.03213 -0.016
E -0.18887 -0.0944
A:B 0.5672 0.1418
Can someone explain what happens with these fitting procedure.
Thanks
Isabelle Zabalza-Mezghani
--
Isabelle Zabalza-Mezghani Tel : 01 47 52 61 99
Institut Français du Pétrole E-mail : isabelle.zabalza-mezghani at ifp.fr
1-4 Av. Bois Preau - Bat Lauriers
92852 Rueil Malmaison Cedex, France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20001026/e7876bfe/attachment.html
More information about the R-help
mailing list