Answered step by step
Verified Expert Solution
Question
1 Approved Answer
response variable. Garage is a categorical predictor, logprice and main.living.area are numerical predictors. > table (Garage) Garage No Yes 1516 1484 > table (Bricks)
response variable. Garage is a categorical predictor, logprice and main.living.area are numerical predictors. > table (Garage) Garage No Yes 1516 1484 > table (Bricks) Bricks No 2797 Yes 203 > m6.1 summary(m6.1) Call: glm(formula = factor (Garage) ~ logprice + total.full + Bricks, family = binomial(), data = Housing) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.819e+01 Togprice 3.147e+00 total.full 7.245e-06 BricksYes -1.392e+00 1.669e+00 -22.877 1.428e-01 9.205e-07 2.064e-01 (Dispersion parameter for binomial Null deviance: 4158.5 on 2999 Residual deviance: 2414.0 on 2996 < 2e-16 *** 22.044 < 2e-16 *** 7.871 3.52e-15 *** -6.747 1.51e-11 *** family taken to be 1) degrees of freedom degrees of freedom a) State the null and the alternative hypotheses for the difference in deviances that can be used to compare nested models in m6.1. Perform the test. Using R to get the critical value: chisq(0.95,3) = 7.814728. b) Calculate Rev for the logistic regression model m6.1. c) Using the 33th data point to answer this part of question 6, where Yes is the "success". > Housing [33,c(1,9,10,12)] total.full 33 209500 logprice 7.455877 Bricks No Garage Yes i. Calculate the fitted value of the 33th data point. (probability of success) ii. Calculate the odd of the 33th data point. iii. What would you classify the garage status of the house in the 33th data point using m6.1 model? Threshold is 0.5" d) Based on the following R code: > GarageNoYes 0.5, "YES", "NO") > table (GarageNoYes, Garage) GarageNoYes NO YES Garage No 1258 258 Yes 186 1298 Calculate the misclassification error rate. What does 258 represent? i) ii) Does that tell you anything about the error tendencies that m6.1 have? iii) Based on the confusion matrix above, do you think model m6.1 is a good classifier? Justify your answer.
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