[R] Polynomial Regression and NA coefficients in R

2013-04-27 Thread Lucas Holland
Hey all, I'm performing polynomial regression. I'm simulating x values using runif() and y values using a deterministic function of x and rnorm(). When I perform polynomial regression like this: fit_poly - lm(y ~ poly(x,11,raw = TRUE)) I get some NA coefficients. I think this is due to the

Re: [R] Polynomial Regression and NA coefficients in R

2013-04-27 Thread Bert Gunter
Inline. -- Bert On Sat, Apr 27, 2013 at 8:48 AM, Lucas Holland hollandlu...@gmail.com wrote: Hey all, I'm performing polynomial regression. I'm simulating x values using runif() and y values using a deterministic function of x and rnorm(). When I perform polynomial regression like this:

Re: [R] Polynomial Regression and NA coefficients in R

2013-04-27 Thread Joshua Wiley
Hi Lucas, You may find some of these examples useful (towards the end): http://elkhartgroup.com/rmodels.php For example in your case you could be using b splines instead of an 11th order polynomial, or use thin plate regression splines from the mgcv package. I will also humbly suggest that