I am trying to do a CI plot as illustrated in book but I get an error..using the values from a previous thread question
str(predict(g,g1, se=TRUE))
List of 4
$ fit : Named num 28.1
..- attr(*, "names")= chr "1"
$ se.fit : num 4.97
$ df : int 42
$ residual.scale: num 22.7
> grid<-seq(0, 100, 1)
P<-predict(g, data.frame(status=43, income=4.64, verbal=6.66, sex=grid, se=T, interval="confidence"))
> matplot(grid, p$fit, lty=c(1,2,2) xlab="average", ylab="male")
Error in p$fit : $ operator is invalid for atomic vectors
str(predict(g,g1, se=TRUE))
List of 4
$ fit : Named num 28.1
..- attr(*, "names")= chr "1"
$ se.fit : num 4.97
$ df : int 42
$ residual.scale: num 22.7
> grid<-seq(0, 100, 1)
P<-predict(g, data.frame(status=43, income=4.64, verbal=6.66, sex=grid, se=T, interval="confidence"))
> matplot(grid, p$fit, lty=c(1,2,2) xlab="average", ylab="male")
Error in p$fit : $ operator is invalid for atomic vectors