LoslegenKostenlos loslegen

Explaining individual behaviors

In the final exercise of this chapter, you will use the model log_mod2 to predict the contribution of each term to the prediction of one row in new_credit_data.

After predicting, answer the following question:

Which term makes the greatest contribution to the prediction of this first data point?

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.

# Predict from the model
prediction_1 <- ___(log_mod2, 
                        newdata = ___, 
                        type = ___)

# Inspect
prediction_1
Code bearbeiten und ausführen