[R] Plotting data with a fitted curve

Paul Lynch plynchnlm at gmail.com
Tue Apr 17 01:57:32 CEST 2007


Suppose you have a vector of data in x and response values in y.  How
do you plot together both the points (x,y) and the curve that results
from the fitted model, if the model is not y ~ x, but a higher order
polynomial, e.g. y~poly(x,2)?  (In other words, abline doesn't work
for this case.)

Thanks,
     --Paul

-- 
Paul Lynch
Aquilent, Inc.
National Library of Medicine (Contractor)



More information about the R-help mailing list