CommencerCommencer gratuitement

Classifying purchasing behavior

Let's fit some GAMs to the csale data, which has the binary purchase outcome variable.

After you fit the model, answer the following question:

What does the log_mod model estimate the probability of a person making a purchase who has mean values of all variables?

Cet exercice fait partie du cours

Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Examine the csale data frame
head(csale)
str(csale)

# Fit a logistic model
log_mod <- gam(___, data = csale, 
               ___, 
               method = "REML")
Modifier et exécuter le code