शुरू करेंमुफ़्त में शुरू करें

Logistic regression with glm()

Linear regression and logistic regression are special cases of a broader type of models called generalized linear models ("GLMs"). A linear regression makes the assumption that the residuals follow a Gaussian (normal) distribution. By contrast, a logistic regression assumes that residuals follow a binomial distribution.

Here, you'll model how the length of relationship with a customer affects churn.

churn is available.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Introduction to Regression in R

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Fit a logistic regression of has_churned versus time_since_first_purchase using the churn dataset. Assign to mdl_churn_vs_relationship.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Fit a logistic regression of churn vs. length of relationship using the churn dataset
mdl_churn_vs_relationship <- ___





# See the result
mdl_churn_vs_relationship
कोड संपादित करें और चलाएँ