Question
Use data1.dat and treat LD as the response variable and other variables as predictors. (Pease just use data1.dat and do not run the codes in
Use data1.dat and treat LD as the response variable and other variables as predictors. (Pease just use data1.dat and do not run the codes in Problem 1). (a) Reorganize the data so that the resulting data frame contains two columns that contain the counts of LD yes and LD no, respectively. [3 pts] (b) Fit a saturated logit model and use step function to select a model. [7 pts] (c) Obtain the standardized Pearson residuals from the model selected in part (b). What do you conclude? [5 pts] (d) Test whether the association between RDAS-HC level and lane departure is homogeneous, given the other variables. (Hint: which logit model implies the homogeneous association). [5 pts] (e) Use likelihood ratio test to test for conditional independence of RDAS-HC and response, given the other variables. Be sure to clearly state the model and hypothesis you are testing. [5 pts] Bonus: Use the Wald test to test for conditional independence of RDAS-HC and response, given the other variables. [5 pts] (f) Draw the ROC curve for the model selected in Part (b). You may use or modify the following codes to create a suitable data structure. Let Tab2 be the data frame you created in (a) and the column names of LD Yes and No be Yes and No. I assume that they are columns 5 and 6. If not, you can modify the codES
Pleasecreate R codes to be used
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