[R] Confidence intervals and polynomial fits

Ben Haller rhelp at sticksoftware.com
Fri May 6 18:55:24 CEST 2011


> From what you have written, I am not exactly sure what your
> seat-of-the-pant sense is coming from.  My pantseat typically does not
> tell me much; however, quartic trends tend to less stable than linear,
> so I am not terribly surprised.

  My pantseat is not normally very informative either, but if you saw the width of the confidence limits I'm getting for the quartic coefficient, I think your pantseat would agree with mine.  :->  The confidence band is staggeringly wide, many times the variation in the data itself; and with 300,000 data points to fit to, that just should not be the case.  With that many data points, it seems quite obvious that one can be "95% confident" that the true data lies within a band somewhere reasonably close to the band that the sample data actually fall into, not a band many times wider.

> As two side notes:
> 
> x_qt <- x^4 # shorter code-wise
> and you can certain just enter a quartic term if the data is just
> quartic and you are not really itnerested in the lower trends.

  Yep, for sure.

  Thanks!

Ben Haller
McGill University

http://biology.mcgill.ca/grad/ben/



More information about the R-help mailing list