I have a problem with understanding how to plot 95% confidence bands for x and y values. The values are below. Can anyone help me?
x<-c(7,9,9,12,14,16,16,14,16,16,17,19,21,24,15,16,17,25,27,15,15,15,16,19,18,17,18,20,22,25,24)
y<-c(25,25,25,27,27,27,24,30,30,31,30,31,30,28,32,32,32,32,34,34,34,35,35,34,35,36,37,38,40,39,43)
I've also done the following:
lm(x~y)
summary(lm(x~y))
plot(x~y)
abline(lm(x~y))
lm.velo <-lm(x~y)
fitted(lm.velo)
predict(lm.velo,int="c")
predict(lm.velo,int="p")
I am new to R and I don't quite understand everything yet. I was ask to find the 95% confidence bands for predicting mean y per value of x and 95% prediction bands for predicting individual y values. Please help me. Thank you.