So i'm trying to find the 95% confidence band for the regression line when Xh=28, but I'm not sure how to get it work in R. the X represent ACT score and Y represent GPA. here's my script so far
attach(GPA1)
plot(GPA ~ ACT,
xlab="ACT scores", ylab="GPA",
main="GPA vs. ACT scores")
abline(score$coef,col="red")
score<-lm(GPA~ACT)
GPA.clim <- predict(score, new<-data.frame(ACT=28),se.fit=TRUE,interval="confidence")
GPA.clim
GPA.clim<-predict(score,interval="confidence")
GPA.clim
GPA.plim<-predict(score,interval="predict")
GPA plim
I'm not sure how to use a metline in this case for both the prediction band and confidence band at x=28.