Question: Do AIC and ROC in the above sample give consistent results? Why or why not? ## ROC Curve and calculating the area under the curve
Do AIC and ROC in the above sample give consistent results? Why or why not?
## ROC Curve and calculating the area under the curveAUC
libraryROCR
predictions predictmodel newdatatest, type"response"
ROCRpred predictionpredictions test$Survived
ROCRperf performanceROCRpred measure tpr xmeasure fpr
plotROCRperf colorize TRUE, text.adj c print.cutoffs.at seq
auc performanceROCRpred measure "auc"
auc auc@yvalues
auc
model glmSurvived familybinomialink'logit' datatrain
summary model
Ca:
gmformua Survived famiy binomiaink ogit"
data train
Coefficients: not defined because of singularities
Signif; codes:
n to be
Nu deviance: on degrees of freedom Resiual deviance: on degrees
of freedom
AIC:
Number of Fisher Scoring iterations:
## ROC Curve and calculating the area under the curveAUC
libraryROCR ROCRpred predictionpredictions test$Survived
ROCRperf performanceROCRpred measure tpr x measure fpr
plotROCRperf colorize TRUE, text.adj
print.cutoffs.at seq
auc performanceROCRpred measure "auc"
auc auc@y values
auc
False positive rate
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
