My script fits a third-order polynomial to my data with something like this:

model <- lm( y ~ poly(x, 3) )

What I'd like to do is find the theoretical maximum of the polynomial (i.e. the 
x at which "model" predicts the highest y).  Specifically, I'd like to predict 
the maximum between 0 <= x <= 1.

What's the best way to accomplish that in R?

Bonus question: can R give me the derivative or 2nd derivative of the 
polynomial?  I'd like to be able to compute these at that maximum point.

Thanks in advance!


// joseph w. clark , phd , visiting research associate
\\ university of nebraska at omaha - college of IS&T                            
          
______________________________________________
R-help@r-project.org 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.

Reply via email to