Reputation: 49
In R, after creating a linear model using the function model <- lm()
and plotting it using plot(model)
, you will get back 4 graphs each displaying your model differently. Can anyone explain what these graphs mean?
Upvotes: 2
Views: 1685
Reputation: 66874
plot.lm
can produce 6 different diagnostic plots, controlled by the which
parameter. These are:
By default it will produce numbers 1, 2, 3 and 5, pausing between plots in interactive mode.
You can see them all in one go if you set up the graphics device for multiple plots, eg:
mdl <- lm(hp~disp,mtcars)
par(mfrow=c(3,2))
plot(mdl,which=1:6)
Interpretation of these plots is a question for Cross Validated, though ?plot.lm
gives some basic information.
Upvotes: 3