Skip to content

Commit

Permalink
Update index.Rmd
Browse files Browse the repository at this point in the history
Not sure why this was deleted.
  • Loading branch information
bcaffo committed Aug 17, 2015
1 parent e924dcb commit f5389a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 07_RegressionModels/01_07_inference/index.Rmd
Expand Up @@ -157,8 +157,15 @@ g
---

## In R
```{r, fig.height=5, fig.width=5, echo=FALSE,results='hide'}
newdata <- data.frame(x = xVals)
p1 <- predict(fit, newdata, interval = ("confidence"))
p2 <- predict(fit, newdata, interval = ("prediction"))
plot(x, y, frame=FALSE,xlab="Carat",ylab="Dollars",pch=21,col="black", bg="lightblue", cex=2)
abline(fit, lwd = 2)
lines(xVals, p1[,2]); lines(xVals, p1[,3])
lines(xVals, p2[,2]); lines(xVals, p2[,3])
```



Expand Down

0 comments on commit f5389a2

Please sign in to comment.