Skip to content
Prev 138819 / 398506 Next

Puzzling coefficients for linear fitting to polynom

poly() computes by default orthogonal polynomials; check the online 
help file for poly() for more info. Probably you want to use the 'raw' 
argument in this example, i.e.,

x <- 1:3
y <- c(1, 4, 9)
lm(y ~ poly(x, 2, raw = TRUE))


I hope this helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Firas Swidan, PhD" <frsswdn at gmail.com>
To: <r-help at r-project.org>
Sent: Friday, March 07, 2008 9:16 AM
Subject: [R] Puzzling coefficients for linear fitting to polynom
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm