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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started