You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding fig 5.3 (Predicted probability of attrition based on monthly income and whether or not employees work overtime)
Model 3 is a main effect model. The model lines in figure 5.3 are made using geom_smooth(). This results in lines in which the interaction effect is also taken into account. A better way to illustrate the model with only main effects, could be just to plot the predictions from the model. I did this with modelr::add_predictions() : churn_train3 <- modelr::add_predictions(churn_train, model = model3, type = "response") %>% mutate(prob = ifelse(Attrition == "Yes", 1, 0))
The text was updated successfully, but these errors were encountered:
MMJansen
changed the title
Figure 5.3 Shows interaction model (Predicted probability of attrition based on monthly income and whether or not employees work overtime)
Figure 5.3 shows interaction model instead of main effect model
Oct 8, 2022
Version of the book 2020-02-01
Regarding fig 5.3 (Predicted probability of attrition based on monthly income and whether or not employees work overtime)
Model 3 is a main effect model. The model lines in figure 5.3 are made using geom_smooth(). This results in lines in which the interaction effect is also taken into account. A better way to illustrate the model with only main effects, could be just to plot the predictions from the model. I did this with
modelr::add_predictions()
:churn_train3 <- modelr::add_predictions(churn_train, model = model3, type = "response") %>% mutate(prob = ifelse(Attrition == "Yes", 1, 0))
The text was updated successfully, but these errors were encountered: