###--- >>> `plot.lm' <<<----- Plot Diagnostics for an lm Object

	## alias	 help(plot.lm)
	## alias	 help(plot.mlm)

##___ Examples ___:

## Analysis of the life-cycle savings data
## given in Belsley, Kuh and Welsch.
data(LifeCycleSavings)
plot(lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings))

## 4 plots on 1 page; allow room for printing model formula in outer margin:
par(mfrow = c(2, 2), oma = c(0, 0, 2, 0))
plot(lm.SR)
plot(lm.SR, id.n = NULL)               # no id's
plot(lm.SR, id.n = 5, labels.id = NULL)# 5 id numbers

## Fit a smmooth curve, where applicable:
plot(lm.SR, panel = panel.smooth)
## Gives a smoother curve
plot(lm.SR, panel = function(x,y) panel.smooth(x, y, span = 1))

par(mfrow=c(2,1))# same oma as above
plot(lm.SR, which = 1:2, sub.caption = "Saving Rates, n=50, p=5")

 par(mfrow=c(1,1), oma= rep(0,4))
 data(longley)
 summary(lm.fm2 <- lm(Employed ~ . - Population - GNP.deflator, data = longley))
 for(wh in 1:4) plot(lm.fm2, which = wh)


## Keywords: 'hplot', 'regression'.


