Skip to content

Plotting a linear model object with R 2.0 for Mac OS X

3 messages · Justin Manjourides, Uwe Ligges, Thomas Lumley

#
I'm using R for Mac OS X Aqua GUI version 2.0

When using plot() with a linear model object, the plot of the LSR line does not
appear. I get the residual plots, the Normal Q-Q plots and Cook's Differnce
plot, just not the first plot with the fitted line. I just get an empty Quartz
window, with no graph displayed. I've even tried to use plot.lm() and plotting
a glm object, but I get the same results. Has anybody run into this problem?

Justin Manjourides
#
Justin Manjourides wrote:

            
First plot the data, then add the line. That's mentioned in the docs and 
all good books about R:

  plot(data)
  abline(lmobject)

Uwe Ligges
#
On Wed, 3 Nov 2004, Justin Manjourides wrote:

            
There is no 'first plot with the fitted line' in the documentation, 
because it would not be possible with more than one predictor.  The first 
plot should be residuals vs fitted values.

To overlay a fitted regression line on a scatterplot of the data use 
abline(your.model).

 	-thomas