[R] change the "coeffcients approach" on an anova

(Ted Harding) ted.harding at nessie.mcc.ac.uk
Sun Jul 8 03:18:27 CEST 2007


On 08-Jul-07 00:36:46, vincent guyader wrote:
> hi everybody
> 
> I have to do a lot of Anova with R and I would like to have another
> type of
> coefficients coding.. I explain.
> 
> by default if I have 2 temperatures for an experience. 100°C or 130°C
> and I
> want to see the temperature effect on the presure
> I want to estimate the coefficient of each temperature.
> 
> I will obtain ,with the anova, juste one coefficients for example +3,56
> (for
> 100°C), and the other (for 130°C) is always  zero.
> 
> but I prefer to obtain + 1,78 or the first effect and -1,78 for the
> second
> (the intercept is also different too)
> 
> my script is (it s just an example)
> 
> rinfo2 <- (lm(pression~ temp, data=rebe))
> anova(rinfo2)
> summary(rinfo2)
> 
> what can I change to obtain what I need?

Try

  rinfo2 <- (lm(pression~temp-1, data=rebe))

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 08-Jul-07                                       Time: 02:18:24
------------------------------ XFMail ------------------------------



More information about the R-help mailing list