Question: I need help with coding a logistic regression the data set can be used in R using the following command install.packeges(ISLR) library(ISLR) data(Caravan) details on
I need help with coding a logistic regression
the data set can be used in R using the following command
install.packeges("ISLR")
library(ISLR)
data("Caravan")
details on this set of data can be viewed here: https//:liacs.leidenuniv.nl/~puttenpwhvander/library/cc2000/data.html
I need help with:
a - produce some numerical and graphical summaries of the Caravan dataset. Pick 2 or 3 variables that are interesting
b - split the dataset into training and test
c - with the training dataset create logistic regression with Purchase as the response and 5 variables as predictors. Print the result using the summary fonction. which of the predictors appear to be statistically significant? if so, which one?
d - compute the confusion matrix and overall fraction of correct predictions. Explain what the confusion matrix is saying about the types of mistakes made by logistic regression
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
