Question: Using Rstudio We continue to consider the use of a logistic regression model to predict the probability of default using income and balance on the

Using Rstudio

We continue to consider the use of a logistic regression model to predict the probability ofdefaultusing income andbalanceon theDefaultdata set. In particular, we will now compute estimates for the standard errors of the income and balance logistic regression coefficients in two different ways: (1) using the bootstrap, and (2) using the standard formula for computing the standard errors in theglm()function. Do not forget to set a random seed before beginning your analysis.

(a) Using thesummary()andglm()functions, determine the estimated standard errors for the coefficients associated with income and balance in a multiple logistic regression model that uses both predictors.

(b)Write the function,boot.fn(), that takes as input the Default data set as well as an index of the ob- servations, and that outputs the coefficient estimates for income and balance in the multiple logistic regression model.

(c)Use theboot()function together with yourboot.fn()function to estimate the standard errors of the logistic regression coefficients for income and balance.

(d)Comment on the estimated standard errors obtained using theglm()function and using your bootstrap function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!