[R] polynomial regression and poly

Venables, Bill (CMIS, Cleveland) Bill.Venables at CMIS.CSIRO.AU
Tue Jul 10 01:43:09 CEST 2001

>  -----Original Message-----
> From: 	Robert.Denham at dnr.qld.gov.au
[mailto:Robert.Denham at dnr.qld.gov.au] 
> Sent:	Monday, 9 July 2001 5:20 PM
> To:	r-help at hypatia.math.ethz.ch
> Subject:	[R] polynomial regression and poly
> When doing polynomial regression I believe it is a good idea to use the
> function to generate orthogonal polynomials.  When doing this in Splus
> is a handy function (transform.poly I think) to convert the coefficients
> produced by regression with the poly function back to the original scale.
> Has somebody written something similar for R ?  
> Robert 

Couple of fastidious little points.

If there is such a thing in S-PLUS, I am not aware of it.  What is available
is the ability to evaluate the same polynomials at different x-values.
(See, for examle, poly.raw .)

Also it is not completely clear what you mean by "back to the original
scale".  I presume this means "back to the standard power basis".  The only
facility I am aware of that will do this is the polynom library, but can be
a considerable investment in time to learn how to use it.  There is a fairly
good payoff, though, if you are going to be fiddling with univariate
polynomials like this at all often.

Bill Venables
Bill Venables, CMIS
CSIRO Marine Laboratories, PO Box 120, Cleveland, Qld. 4163
Phone: +61 7 3826 7251  Fax: +61 7 3826 7304
Email: Bill.Venables at cmis.csiro.au  http://www.cmis.csiro.au/bill.venables/
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list