[R] Confidence intervals and polynomial fits

Mike Marchywka marchywka at hotmail.com
Sun May 8 16:02:09 CEST 2011





> From: pdalgd at gmail.com
> Date: Sun, 8 May 2011 09:33:23 +0200
> To: rhelp at sticksoftware.com
> CC: r-help at r-project.org
> Subject: Re: [R] Confidence intervals and polynomial fits
>
>
> On May 7, 2011, at 16:15 , Ben Haller wrote:
>
> > On May 6, 2011, at 4:27 PM, David Winsemius wrote:
> >
> >> 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
> >
> > Wow, that's very interesting. Quite unexpected, for me. Food for thought. Thanks!
> >
>
> Notice that because of the high correlations between the x^k, their parameter estimates will be correlated too. In practice, this means that the c.i. for the quartic term contains values for which you can compensate with the other coefficients and still have an acceptable fit to data. (Nothing strange about that; already in simple linear regression, you allow the intercept to change while varying the slope.)

I was trying to compose a longer message but at least for even/odd it isn't hard to find a set
of values for which cor is zero or to find a set of points that make sines of different frequencies have
non-zero correlation- this highlights the fact that the computer isn't magic and it
needs data to make basis functions different from each other. 
For background, you probably want to look up "Taylor Series" and "Orthogonal Basis."
I would also suggest using R to add noise to your input and see what that does to your predictions
or for that matter take simple known data and add noise although I think in principal you can
do this analytically. You can always project a signal
onto some subspace and get an estimate of how good your estimate is, but that is different from
asking how well you can reconstruct your signal from a bunch of projections. 
If you want to know, "what can I infer about the slope of my thing at x=a" that is a
specific question about one coefficient but at this point statisticians can elaborate about
various issues with the other things you ignore. Also, I think you said something about
correclated at x=0 but you can change your origin, (x-a)^n and expand this in a finite series in x^m
to see what happens here. 

Also, if you are using hotmail don't think that a dot product is not html LOL since
hotmail know you must mean html when you use less than even in text email...


>
>
> --
> Peter Dalgaard
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>
> ______________________________________________
> R-help at r-project.org 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.
 		 	   		  


More information about the R-help mailing list