BaşlayınÜcretsiz Başlayın

Visualizing each explanatory variable

Being able to see the predictions made by a model makes it easier to understand. In the case where there is only one explanatory variable, ggplot lets you do this without any manual calculation or messing about.

To visualize the relationship between a numeric explanatory variable and the numeric response, you can draw a scatter plot with a linear trend line.

To visualize the relationship between a categorical explanatory variable and the numeric response, you can draw a box plot.

taiwan_real_estate is available and ggplot2 is loaded.

Bu egzersiz

Intermediate Regression in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Using taiwan_real_estate, plot price_twd_msq vs. n_convenience
___ +
  # Add a point layer
  ___ +
  # Add a smooth trend line using linear regr'n, no ribbon
  ___
Kodu Düzenle ve Çalıştır