[R] Confidence intervals and polynomial fits

David Winsemius dwinsemius at comcast.net
Fri May 6 22:27:17 CEST 2011


On May 6, 2011, at 4:16 PM, Ben Haller wrote:
>
>
>  As for correlated coefficients: x, x^2, x^3 etc. would obviously be  
> highly correlated, for values close to zero.

Not just for x close to zero:

 > cor( (10:20)^2, (10:20)^3 )
[1] 0.9961938
 > cor( (100:200)^2, (100:200)^3 )
[1] 0.9966219


> Is this what you mean, as a potential source of problems?  Or if you  
> mean that the various other terms in my model might be correlated  
> with x, that is not the case; each independent variable is  
> completely uncorrelated with the others (this data comes from  
> simulations, so the independent variables for each data point were  
> in fact chosen by random drawing).
>
>  It didn't seem easy to post an example, since my dataset is so  
> large, but if either of you would be willing to look at this  
> further, I could upload my dataset to a web server somewhere and  
> post a link to it.  In any case, thanks very much for your help;  
> I'll look into the things you mentioned.
>
> Ben Haller
> McGill University
>
> http://biology.mcgill.ca/grad/ben/

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list