Confidence Intervals and Prediction Intervals
Let's learn about confidence and prediction intervals in this lesson.
Confidence intervals
One of the great things about the ggplot2
package is that we can use the qplot()
function to easily plot a variety of smoothers—from simple linear regression slopes to more complex curves—together with their confidence intervals. For example, we can easily plot the linear regression with its 95% CI, as shown in the figure below:
Get hands-on with 1400+ tech skills courses.