预测性能

在 R 中构建响应模型

Kathrin Gruber

Assistant Professor of Econometrics Erasmus University Rotterdam

分类

predicted <- ifelse(fitted.values(extended.mod) >= 0.5, 1, 0)

table(predicted)/2798
predicted
      0       1 
0.96605 0.03395
在 R 中构建响应模型

模型混淆

observed <- choice.data$HOPPINESS
table(observed, predicted)/2798
        predicted
observed       0       1
       0 0.88849 0.01144
       1 0.07756 0.02252
在 R 中构建响应模型

ROC 曲线

library(pROC)
Roc <- roc(predictor = fitted.values(extended.mod), response = observed)

plot(Roc)

在 R 中构建响应模型

让我们练习!

在 R 中构建响应模型

Preparing Video For Download...