Dummy variables, missing data, and interactions

Học có giám sát trong R: Phân loại

Brett Lantz

Instructor

Dummy coding categorical data

# create gender factor
my_data$gender <- factor(my_data$gender,
                         levels = c(0, 1, 2),
                         labels = c("Male", "Female", "Other"))
Học có giám sát trong R: Phân loại

Imputing missing data

Same AUC, Different ROC

Same AUC, Different ROC

Học có giám sát trong R: Phân loại

Interaction effects

Same AUC, Different ROC

Same AUC, Different ROC

# interaction of obesity and smoking
glm(disease ~ obesity * smoking,
      data = health,
      family = "binomial")
Học có giám sát trong R: Phân loại

Let's practice!

Học có giám sát trong R: Phân loại

Preparing Video For Download...