НачатьНачать бесплатно

Exploring the explanatory variables

When the response variable is logical, all the points lie on the y equals zero and y equals one lines, making it difficult to see what is happening. In the video, until you saw the trend line, it wasn't clear how the explanatory variable was distributed on each line. This can be solved with a histogram of the explanatory variable, faceted on the response.

You will use these histograms to get to know the financial services churn dataset seen in the video.

churn is available and ggplot2 is loaded.

Это упражнение является частью курса

Introduction to Regression in R

Посмотреть курс

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Using churn, plot time_since_last_purchase
___ +
  # as a histogram with binwidth 0.25
  ___ +
  # faceted in a grid with has_churned on each row
  ___
Редактировать и запускать код