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? best regards -- _________________________________ Vincent GUYADER École nationale supérieure d'agronomie de Rennes (ENSAR) EN156 - Spécialité statistiques appliquées 06.22.85.34.27 [[alternative HTML version deleted]]
Gabor Grothendieck
2007-Jul-08 00:52 UTC
[R] change the "coeffcients approach" on an anova
On 7/7/07, vincent guyader <guyader at agrocampus-rennes.fr> 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))Try: lm(pression ~ temp + 0, rebe)> anova(rinfo2) > summary(rinfo2) > > what can I change to obtain what I need? > > best regards > > > > -- > _________________________________ > Vincent GUYADER > ?cole nationale sup?rieure d'agronomie de Rennes (ENSAR) > EN156 - Sp?cialit? statistiques appliqu?es > 06.22.85.34.27 > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help at stat.math.ethz.ch 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. > >
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible Url : https://stat.ethz.ch/pipermail/r-help/attachments/20070708/16c270e0/attachment.pl
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 ------------------------------