1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Introduction to Regression in R

Connected

अभ्यास

Visualizing predictions

The prediction data you calculated contains a column of explanatory variable values and a column of response variable values. That means you can plot it on the same scatter plot of response versus explanatory data values.

prediction_data is available and ggplot2 is loaded. The code for the scatter plot with linear trend line you drew in Chapter 1 is shown.

निर्देश

100 XP
  • Extend the plotting code to include the point predictions in prediction_data. Color the points yellow.