Skip to content
Prev 198242 / 398500 Next

how do I plot a regression curve with the data?

Hi Ken,

Perhaps something like

plot(x,y)
lines(sort(x), fit$fitted.values[order(x)])

should do what I think you want.  I think you have to be a bit careful
on the ordering of the fitted values so that they match up with the
order of the x variable, otherwise you get an odd looking line plot.

Regards,

Andrew
On Oct 28, 5:42?am, Ken Ervin <ervinj... at gmail.com> wrote: