Question: Hi I need help in below questions: 8. 1 library(MASS) 1 point Run Reset For Exercises 8 - 15, we will use two related diabetes

Hi I need help in below questions:

Hi I need help in below questions: 8. 1 library(MASS) 1 pointRun Reset For Exercises 8 - 15, we will use two relateddiabetes datasets about the Pima Native Americans from the MASS package; Pima.trand Pima.te. For details, use ?MASS::Pima.tr. They are essentially a train (Pima.tr)and test (Pima.te) dataset that are pre-split. Recall that p(x) = P[Y= 1 | X =x] Use to training data to fit themodel log (P(x) = Bo + B121 + 32x2 + B3x] +B4x2 + 3521202 where . Y is a binary categorical variable that

8. 1 library(MASS) 1 point Run Reset For Exercises 8 - 15, we will use two related diabetes datasets about the Pima Native Americans from the MASS package; Pima.tr and Pima.te. For details, use ?MASS::Pima.tr. They are essentially a train (Pima.tr) and test (Pima.te) dataset that are pre-split. Recall that p(x) = P[Y = 1 | X =x] Use to training data to fit the model log (P(x) = Bo + B121 + 32x2 + B3x] + B4x2 + 3521202 where . Y is a binary categorical variable that takes the value 1 when an individual is diabetic according to WHO criteria, 0 if not . X1 is glu . X2 is ped Report the estimate of B4. Hint: You do not need to create a response variable with values 1 and 0, instead you can use the factor variable type. Enter answer here9. 1 library(MASS) 1 point Run Reset Use the model fit in Exercise 8 to obtain a predicted probability of diabetes for each of the individuals in the test dataset (Pima.te). What proportion of these probabilities are larger than 0.80? Enter answer here10' 1 1ibrar'y(MASS) 1 point Reset Fit an additive logistic regression to model the probability of diabetes using the train dataset, Pima.tr, which uses all available predictors in the dataset. Using this as an initial model, use AIC and a backwards stepwise procedure to select a reduced model. How many predictors are used in this reduced model? Enter answer here 11 . 1 library(MASS) 1 point Run Reset Fit a logistic regression to model the probability of diabetes using the train dataset, Pima.tr, which uses all available predictors in the dataset as well as all possible two-way interactions. Using this as an initial model, use AIC and a backwards stepwise procedure to select a reduced model. What is the deviance of this reduced model? Enter answer here12. library(MASS) 1 point library(boot) # Fit the models here set. seedC4Z) # get crossvalidated results For the polynomial model here set.seed(42) # get crossvalidated results For the additive model here 10 set. seedC4Z) 11 # get crossvalidated results for the model selected from additive model here LDOOVC'm-PWNH 12 set. seedC4Z) Run 13 # get crossvalidated results For the interaction model here 14 set. seedC4Z) Reset 15 # get crossvalidated results For the model selected from interaction model here Obtain 5-fold cross-validated misclassification rates for each of the previous 5 models used as classiers that seek to minimize the misclassication rate. (The models from Exercises 8, 10, and 11) Since the data will be split randomly, use the seeds provided to obtain the cross-validated results after fitting the models. Also, use the relevant cross-validation function from the boot package to ensure your calculation uses the same splits for grading purposes. (Even with the same seed, the splits could be done differently.) Report the best cross-validated misclassification rate of these ve. Enter answer here 13. 1 library(MASS) 1 point Run Reset Using the additive model previously fit to the training dataset, create a classifier that seeks to minimize the misclassification rate. Report the misclassification rate or this classifier in the test dataest. Enter answer here14. 1 library(MASS) 1 point Run Reset Using the additive model previously fit to the training dataset, create a classifier that seeks to minimize the misclassification rate. Report the sensitivity of this classifier in the test dataset. Enter answer here15. 1 library (MASS) 1 point Run Reset Using the additive model previously fit to the training dataset, create a classifier that classifies an individual as diabetic if their predicted probability of diabetes is greater than 0.3. Report the sensitivity of this classifier in the test dataset. Enter answer here

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!