# [R] Orthogonal Polynomials

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Oct 9 08:28:57 CEST 2002

```The difference is just normalization (and that the tables are transposed
in your example).  That is, R uses orthonormal polynomials, and tables of
orthogonal polynomials also have normalizing coefficients.

Normalization should not affect the least-squares fitting, but it does
make interpretation of the coefficients easier.

On Tue, 8 Oct 2002, Bliese, Paul D MAJ WRAIR-Wash DC wrote:

> Looking to the wonderful statistical advice that this group can offer.
>
> In behavioral science applications of stats, we are often introduced to
> coefficients for orthogonal polynomials that are nice integers.  For
> instance, Kirk's experimental design book presents the following
> coefficients for p=4:
>
> Linear     -3 -1  1  3
> Quadratic   1 -1 -1  1
> Cubic      -1  3 -3  1
>
> In R orthogonal polynomials are not integers. For instance, in R where p =4:
>
> > poly(c(1:4),3)
>               1    2          3
> [1,] -0.6708204  0.5 -0.2236068
> [2,] -0.2236068 -0.5  0.6708204
> [3,]  0.2236068 -0.5 -0.6708204
> [4,]  0.6708204  0.5  0.2236068
>
> Where, of course, column 1 is linear, column 2 Quadratic and 3 cubic.
>
> My experience is that the coding scheme used in R works "better" than the
> integer scheme discussed in Kirk for many regression type analyses.
>
> Can anyone enlighten me as to why?
>
> Thanks,
>
> Paul Bliese
> Walter Reed Army Institute of Research
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

--
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```