Skip to content
Prev 32429 / 398530 Next

plot output function

no, I'm afraid abline does not help, it works only for straight lines.

The output of my function is a vector of fitted values (called fit).
I would like to superimpose the fitted regression line to the
scatterplot of the data. 
Therefore, I use the commands "plot(x,y)"to display the scatterplot;
then
"lines(x,fit)" to add the estimated regression line.
The graph displays the scatterplot correctly but not the fitted
regression line.
When I use the command "plot(x,fit)" I get the correct regression line
but the plot is very rough, it looks like that, instead of a single
clear line, I get several thin lines.

Hope this is clearer.

Thank you,

Chiara
Uwe Ligges wrote: