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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With