Reputation: 331
When I use plot() with a linear model, I get 4 plots, A normal QQ plot, residuals vs fitted, etc.
How do I get it so I only get the normal QQ plot, or only residual plot. I did it before, I think there is an argument like number= n or something. I need to know so I can save images for all the plots.
Upvotes: 14
Views: 12653
Reputation: 2818
you should read the documentation of the function plot.lm which is the plot function dedicated to lm. You can select the graphs that you want to display with argument "which". There is 6 graphs that you can choose:
# for the qqplot & residual plot
plot(lm1, which=c(2,1))
hth
Upvotes: 19