0% found this document useful (0 votes)
11 views1 page

Exercise 2.3 Logistic Regression

Uploaded by

Joel Lim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Exercise 2.3 Logistic Regression

Uploaded by

Joel Lim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Exercise 2.

3 Logistic Regression

Part A: Logistic Regression on Binary Y:

1. Run the Rscript passexam.R on (a) passexam.csv dataset and then on (b) passexam2.csv
dataset. What is the cause of the error? Explain.

2. Execute logistic regression on default.csv dataset to predict default:

a. Verify the baseline reference level for default.

b. Which variables are statistically insignificant?

c. Keeping only statistically significant variables, show the confusion matrix.

d. Using set.seed(2) with 70-30 train-test splt, and keeping only statistically significant
variables, show the trainset confusion matrix and testset confusion matrix.

e. An analyst commented that AvgBal is a weak predictor of Default. Do you agree?


Explain.

Part B: Questions for Research Paper [Freitas et. al. (2012)] Reading:

1. How are outliers determined? Why is this impt?

2. What is the difference between adjusted Odds Ratio and unadjusted Odds Ratio?

3. How did Freitas et. al. (2012)] identify high risk factors? Hint: See Table 1.

Part C: Logistic Regression on Multi-category Y:

1. Set Service Rating = Neutral as the baseline reference level for Rating, in rating.csv dataset.

2. Develop Logistic regression to explain Rating using the multinom() function from Rpackage
nnet. Which variables are statistically significant? [Note: glm() function cannot be used here.]

3. What is the model predicted service rating for each of the case in the dataset?

4. Show the confusion matrix.

You might also like