silly lm and anova question
1
0
Entering edit mode
@james-anderson-1641
Last seen 9.6 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20061211/ 6e472026/attachment.pl
• 540 views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 10 days ago
EMBL European Molecular Biology Laborat…
Dear James, You will need to send a code example that other people can copy/paste, rerun and reproduce. Otherwise you may have very little chance of getting a meaningful answer. Best wishes Wolfgang Huber ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber James Anderson wrote: > Hi, > I am using linear model lm and anova. However, I found the following weird phenomenon: > > g1 = lm(z ~ x+y) > g2 = lm(z ~ y+x) > > g1 and g2 have the same linear regression results. However, > anova(g1) and anova(g2) gives very different results in the calculation for sum of square in x and y. the residuals are the same. It looks like a simple question, but I have not figured it out why. > > Many thanks, > James >
ADD COMMENT
0
Entering edit mode
Hi James, There is nothing weird at all in your lm() results. You must be aware that the anova table that you are obtaining is a sequential analysis of variance, so when you fit: g1 = lm(z ~ x+y) the sum of squares of x measures the contribution of *x*, after fitting a overall mean (intercept), and the ss of *y*, gives the contribution of *y* after fitting the overall mean and the *x*. These ss are known as type I or sequential sum of squares.- This sequential SS tells you how much the residual sum of squares is reduced by adding a parameter to a model that already contains other factors. So, if you change the order of parameters in your formula, you will obtain different ss. HTH.- Pedro.- -----Mensaje original----- De: bioconductor-bounces at stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] En nombre de Wolfgang Huber Enviado el: martes, 12 de diciembre de 2006 10:18 Para: James Anderson CC: bioconductor Asunto: Re: [BioC] silly lm and anova question Dear James, You will need to send a code example that other people can copy/paste, rerun and reproduce. Otherwise you may have very little chance of getting a meaningful answer. Best wishes Wolfgang Huber ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber James Anderson wrote: > Hi, > I am using linear model lm and anova. However, I found the following weird phenomenon: > > g1 = lm(z ~ x+y) > g2 = lm(z ~ y+x) > > g1 and g2 have the same linear regression results. However, > anova(g1) and anova(g2) gives very different results in the calculation for sum of square in x and y. the residuals are the same. It looks like a simple question, but I have not figured it out why. > > Many thanks, > James > _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY

Login before adding your answer.

Traffic: 601 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6