Skip to content

plot question

3 messages · David Nogués, Spencer Graves, Marc Schwartz

#
Hello:

Im a novice user of R. I was triying develop graphs with plot.lm or 
plot(gam) but I dont obtain a desire result. I would like to create a 
plot from lm, glm and gam objects showing:

1- Fit curve
2- Raw data of predictor and response variables as points.
3- Confidence intervals (95%)

Anybody can help me?
#
Have you considered "predict.lm"?  The documentation includes an example 
that will produce predicted lines plus both confidence and tolerance 
intervals.  Follow that with "points(x, y)" to add the data points.

hope this helps.  spencer graves
David Nogu?s wrote:
#
Here is a link to a post of mine back in March which provides example
code for plot.lm():

https://www.stat.math.ethz.ch/pipermail/r-help/2003-March/030057.html

HTH,

Marc Schwartz