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? 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! --j -- Jonathan A. Greenberg, PhD NRC Research Associate NASA Ames Research Center MS 242-4 Moffett Field, CA 94035-1000 Office: 650-604-5896 Cell: 415-794-5043 AIM: jgrn307 MSN: jgrn307 at hotmail.com
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
Dear Jonathan, An alternative is to use the raw argument to poly(), possibly after centering the predictor. This probably will work OK as long as the degree of the polynomial isn't high. I hope this helps, John -------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox --------------------------------> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of > Jonathan Greenberg > Sent: Wednesday, November 01, 2006 9:39 PM > To: R-help > Subject: [R] poly() question > > 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? 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! > > --j > > -- > Jonathan A. Greenberg, PhD > NRC Research Associate > NASA Ames Research Center > MS 242-4 > Moffett Field, CA 94035-1000 > Office: 650-604-5896 > Cell: 415-794-5043 > AIM: jgrn307 > MSN: jgrn307 at hotmail.com > > ______________________________________________ > R-help at stat.math.ethz.ch 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.