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.

Help with r code

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!