4
對於下面給出的例子,我怎麼能畫出虛線之間的區域?R plot中的邊界
下面是代碼:
X <- rnorm(100)
Y<- X + rnorm(100)
reg<-lm(Y~X)
CI <- predict(reg,interval="confidence")
F <- CI[,1]
L <- CI[,2]
U <- CI[,3]
plot(X,F)
abline(reg, col="red")
reg2<-lm(L~X)
abline(reg2, col="red", lty="dashed")
reg3<-lm(U~X)
abline(reg3, col="red", lty="dashed")
這裏是輸出
確切的重複,我相信。嘗試'?多邊形' – baptiste