LoslegenKostenlos loslegen

Purchase behavior with multiple smooths

In this exercise, you will fit a logistic GAM that predicts the outcome (purchase) in csale, using all other variables as predictors.

After summarizing the model, answer the following question:

Which term in the model is significant but approximately linear?

Diese Übung ist Teil des Kurses

Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Fit a logistic model
log_mod2 <- gam(___,
                data = csale,
                family = binomial,
                method = "REML")

# View the summary
___
Code bearbeiten und ausführen