[R] glm x^2

2005-11-11 Thread Jeffrey Stratford
R-users, I'm having some trouble getting .glm and glm.nb to run a polynomial. I've used x*x and x^2 and neither works. I've checked out the archives and they refer to an archive that's no longer working. I've seen that they use poly() but I'm following up my analysis with cv.glm so I'd

Re: [R] glm x^2

2005-11-11 Thread Sundar Dorai-Raj
I think you want: glm(y ~ x + I(x^2), ...) This is shown as an example on pg 50 of An Introduction to R (R-2.2.0-pdf). HTH, --sundar Jeffrey Stratford wrote: R-users, I'm having some trouble getting .glm and glm.nb to run a polynomial. I've used x*x and x^2 and neither works. I've