# The example from Explanation for R output xy = read.table("HeightsHusbandWife.txt") X = xy$V1 Y = xy$V2 reg = lm(Y~X) summary(reg) anova(reg) plot(X, Y, xlim=c(120, 220), ylim=c(110, 200)) new = data.frame(X=c(120:220)) pred = predict(reg, new, interval="confidence", level=0.90) lines(new$X, pred[,1]) lines(new$X, pred[,2], col="red") lines(new$X, pred[,3], col="red")