Fit a logistic regression model on the "Caravan" data set from the R package "ISLR". This data set, also analyzed in Sec

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Fit a logistic regression model on the "Caravan" data set from the R package "ISLR". This data set, also analyzed in Sec

Post by answerhappygod »

Fit a logistic regression model on the "Caravan" data set from
the R package "ISLR". This data set, also analyzed in Sec 4.6.6 of
ISLR, has 85 predictors and the response variable is "Purchase"
that is equal to "Yes" or "No".
We use the first 1000 obs as the test data and the remaining as
the training data. In the test data, there are 941 "No" and 59
"Yes". For each of the approaches below, report the number of
mis-classified samples among the 941 "No" and the number of
mis-classified samples among 59 "Yes", if we use 0.25 as the
predicted probability cut-off. Also use the R package "pROC" to
report the corresponding AUC. For the definition of AUC and ROC,
read pp146-149 of ISLR.
Fit a logistic regression model using all 85
predictors, and obtain the predicted probabilities on the
test data.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply