For a linear model with 2 variables r = lm(y ~ x1+x2)
When I run plot(r) , I get a bunch of plots such as residuals vs fitted values and so on , but I can only look at one of them at a time . Isnt there a way to seperate them ?
For a linear model with 2 variables r = lm(y ~ x1+x2)
When I run plot(r) , I get a bunch of plots such as residuals vs fitted values and so on , but I can only look at one of them at a time . Isnt there a way to seperate them ?
A few ways. The most convenient is layout. ?layout
for more details
r<-lm(y~x1+x2)
layout(matrix(1:4,2,2))
plot(r)
will produce a window with four plots.