Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Rstudio We will use a logistic regression to predict the probability ofdefaultusing income andbalanceon theDefaultdata set in the ISLR package. We will now estimate

Using Rstudio

We will use a logistic regression to predict the probability ofdefaultusing income andbalanceon theDefaultdata set in the ISLR package. We will now estimate the test error of this logistic regression model using the validation set approach. Do not forget to set a random seed before beginning your analysis.

  1. (a)Fit a logistic regression model that uses income and balance to predict default.
  2. (b)Using the validation set approach, estimate the test error of this model. In order to for this to happen, you must perform the following steps:

i. Split the sample set into a training set and a validation set.

ii.Fit a multiple logistic regression model using only the training observations.

iii. Obtain a prediction of default status for each individual in the validation set by computing the posterior probability of default for that individual, and classifying the individual to the default category if the posterior probability is greater than 0.5.

iv. Compute the validation set error, which is the fraction of the observations in the validation set that are misclassified.

(c) Repeat the process in (b) three times, using three different splits of the observations into a training set and a validation set. Comment on the results obtained.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Finite Mathematics

Authors: Stefan Waner, Steven Costenoble

6th Edition

1285415604, 9781285415604

More Books

Students also viewed these Mathematics questions

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago

Question

1. Understand how verbal and nonverbal communication differ.

Answered: 1 week ago