[R] poly() question

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 2 09:49:46 CET 2006


On Wed, 1 Nov 2006, Jonathan Greenberg wrote:

> Besides the primary citation, "Kennedy, W. J. Jr and Gentle, J. E. (1980)
> Statistical Computing Marcel Dekker." (which is $300 and my library doesn't
> have it), is there any other documentation on how to take a poly() object
> and predict "by hand" new data?

Yes, the R code for poly!

It would be nice to be given credit for providing both a precise reference
*and* access to the code for the algorithm used.

> E.g. What do those coefficients actually
> mean ("The orthogonal polynomial is summarized by the coefficients, which
> can be used to evaluate it via the three-term recursion...")?  We created a
> GLM model with a poly() term and I'm trying to apply this model in another
> program (grass gis via mapcalc) without requiring the direct link with R if
> at all possible.  We'd like to avoid making a lookup table if at all
> possible.  Thanks!

The three-term recursion is obvious in the R code for poly().

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list