Re: [R] Testing for normality of residuals in a regression model

2004-10-18 Thread Thomas Lumley
On Fri, 15 Oct 2004, Kjetil Brinchmann Halvorsen wrote: Liaw, Andy wrote: Also, I was told by someone very smart that fitting OLS to data with heteroscedastic errors can make the residuals look `more normal' than they really are... Don't know how true that is, though. Certainly true, since the re

RE: [R] Testing for normality of residuals in a regression model

2004-10-16 Thread Prof Brian Ripley
I am assuming everyone is on R-help and doesn't want two copies so have trimmed the Cc: list to R-help. On Sat, 16 Oct 2004, Philippe Grosjean wrote: > > Prof Brian Ripley wrote: [ Other contributions previously excised here without comment. ] > > >>However, stats 901 or some such tells you th

RE: [R] Testing for normality of residuals in a regression model

2004-10-16 Thread Philippe Grosjean
> Prof Brian Ripley wrote: > > >>However, stats 901 or some such tells you that if the distributions > >>have even slightly longer tails than the normal you can get much > >>better estimates than OLS, and this happens even before a test of > >>normality rejects on a sample size of thousands. >

Re: [R] Testing for normality of residuals in a regression model

2004-10-16 Thread Federico Gherardini
Prof Brian Ripley wrote: However, stats 901 or some such tells you that if the distributions have even slightly longer tails than the normal you can get much better estimates than OLS, and this happens even before a test of normality rejects on a sample size of thousands. Robustness of efficien

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: . . . . Also, I was told by someone very smart that fitting OLS to data with heteroscedastic errors can make the residuals look `more normal' than they really are... Don't know how true that is, though. Certainly true, since the residuals will be a kind of average, so the C

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Spencer Graves
OK, I'll expose myself: I tend to do normal probability plots of residuals (usely deletion / studentized residuals as described by Venables and Ripley in Modern Applied Statistics with S, 4th ed, MASS4). If the plots look strange, I do something. I'll check apparent outliers for co

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Liaw, Andy
ster University > Hamilton, Ontario > Canada L8S 4M4 > 905-525-9140x23604 > http://socserv.mcmaster.ca/jfox > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Liaw, Andy > > Sent: Friday, Octob

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Prof Brian Ripley
On Fri, 15 Oct 2004, Liaw, Andy wrote: > Let's see if I can get my stat 101 straight: > > We learned that linear regression has a set of assumptions: > > 1. Linearity of the relationship between X and y. > 2. Independence of errors. > 3. Homoscedasticity (equal error variance). > 4. Normality of

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
, October 15, 2004 11:55 AM > To: 'Federico Gherardini'; Berton Gunter > Cc: R-help mailing list > Subject: RE: [R] Testing for normality of residuals in a > regression model > > Let's see if I can get my stat 101 straight: > > We learned that linear regression

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
rom: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Federico Gherardini > Sent: Friday, October 15, 2004 11:22 AM > To: [EMAIL PROTECTED] > Subject: Re: [R] Testing for normality of residuals in a > regression model > > Thank you very much for your suggestions! The

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
cmaster.ca/jfox > -Original Message- > From: Kjetil Brinchmann Halvorsen [mailto:[EMAIL PROTECTED] > Sent: Friday, October 15, 2004 9:12 AM > To: John Fox > Cc: 'Federico Gherardini'; [EMAIL PROTECTED] > Subject: Re: [R] Testing for norm

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Liaw, Andy
Let's see if I can get my stat 101 straight: We learned that linear regression has a set of assumptions: 1. Linearity of the relationship between X and y. 2. Independence of errors. 3. Homoscedasticity (equal error variance). 4. Normality of errors. Now, we should ask: Why are they needed? Can

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Berton Gunter
> > Berton Gunter wrote: > > >>>Exactly! My point is that normality tests are useless for > this purpose for > >>>reasons that are beyond what I can take up here. > >>> > Thanks for your suggestions, I undesrtand that! Could you > possibly give > me some (not too complicated!) > links so tha

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Berton Gunter wrote: Exactly! My point is that normality tests are useless for this purpose for reasons that are beyond what I can take up here. Thanks for your suggestions, I undesrtand that! Could you possibly give me some (not too complicated!) links so that I can investigate this matter furt

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Berton Gunter wrote: Quite right, John! I have 2 additional questions: 1) Why test for normality of residuals? Suppose you reject -- then what? (residual plots may give information on skewness, multi-modality, data "anomalies" that can affect the data analysis). Because I want to know if my mode

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Berton Gunter
ni'; [EMAIL PROTECTED] > Subject: RE: [R] Testing for normality of residuals in a > regression model > > Dear Federico, > > A problem with applying a standard test of normality to LS > residuals is that > the residuals are correlated and heterskedastic even if the

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Kjetil Brinchmann Halvorsen
John Fox wrote: Dear Federico, A problem with applying a standard test of normality to LS residuals is that the residuals are correlated and heterskedastic even if the standard assumptions of the model hold. In a large sample, this is unlikely to be problematic (unless there's an unusual data confi

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Kjetil Brinchmann Halvorsen
John Fox wrote: Dear Federico, A problem with applying a standard test of normality to LS residuals is that the residuals are correlated and heterskedastic even if the standard assumptions of the model hold. In a large sample, this is unlikely to be problematic (unless there's an unusual data confi

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Federico Gherardini
Thank you very much for your suggestions! The residuals come from a gls model, because I had to correct for heteroscedasticity using a weighted regression... can I simply apply one of these tests (like shapiro.test) to the standardized residuals from my gls model? Cheers, Federico _

RE: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread John Fox
Dear Federico, A problem with applying a standard test of normality to LS residuals is that the residuals are correlated and heterskedastic even if the standard assumptions of the model hold. In a large sample, this is unlikely to be problematic (unless there's an unusual data configuration), but

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Dimitris Rizopoulos
Hi Frederico, take also a look at the package "nortest": help(package="nortest") Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/396887 Fax: +32/16/337015 Web: h

Re: [R] Testing for normality of residuals in a regression model

2004-10-15 Thread Stefano Calza
What about shapiro.test(resid(fit.object)) Stefano On Fri, Oct 15, 2004 at 02:44:18PM +0200, Federico Gherardini wrote: > Hi all, > > Is it possible to have a test value for assessing the normality of > residuals from a linear regression model, instead of simply relying on > qqplots? > I've tr