Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 Stats 449 (Due 3-16) Instructions: Use R as needed in Problems 2 and 4 in this homework. Attach and annotate R output where relevant.

4 Stats 449 (Due 3-16) Instructions: Use R as needed in Problems 2 and 4 in this homework. Attach and annotate R output where relevant. Late homework cannot be accepted. 1) The table below shows results when subjects were asked\"Do you think a person has the right to end his or her own life if this person has an incurable disease?\" and \"When a person has a disease that cannot be cured, do you think doctors should be allowed to end the patient's life by some painless means if the patient and his or her family request it?\" The table refers to these variables as \"suicide\" and \"let patient die\". Let Patient Die Yes No Suicide Yes No 1097 203 90 435 a) Perform McNemar's test. State the null hypothesis, the value of the test statistic, the critical value, and your conclusion. Interpret the result. b) Calculate a 95% confidence interval for the dierence of proportions. Is the result significant? Interpret the result. 2) A matched case-control study has 8 pairs of subjects. The cases have colon cancer, and the controls are matched with the cases on gender and age. A possible explanatory variable is the extent of red meat in a subject's diet, measured as \"1 = high\" or \"0 = low\". The (case, control) observations on this were (1,1) for 3 pairs, (0,0) for 1 pair, (1,0) for 3 pairs, and (0,1) for 1 pair. a) Cross-classify the 8 pairs in terms of diet (1 or 0) for the case against diet (1 or 0) for the control. Call this table A. Display the 2 2 8 table with eight partial tables relating diet (1 or 0) to response (case or control) for the 8 pairs. Call this table B. Hint: See Lecture 15. Table A should look like the 2 2 table on pages 9 or 10. Fill in Table A below and show in your homework. Table A Cases Controls High Low Total High Low Total Table B should have the same format as the tables on pages 4 or 5. Table B should have 16 rows and 3 columns. Show Table B in your homework. b) Calculate the McNemar Z 2 for Table A and the Cochran-Mantel-Haenszel (CMH) statistic for Table B. Compare. Hint: Calculate McNemar's Z 2 by hand. Use R (not SAS) to calculate the CMH statistic (see the last page of Lecture 15 under \"An Interesting Result.\" Follow the R code there. The code for the z variable is z <- gl(8,2). How should you code the x and y variables? (Follow your B table). Adjust the code for the CMH statistic slightly using mantelhaen.test(x,y,z,correct=F) c) Using Table A, calculate n21 /n12 . Interpret this value. Compare to the Mantel-Haenszel estimate of a common odds ratio produced by R. 3) Suppose X, Y , and Z are random variables and that V ar(X) = 1 V ar(Y ) = 2 Cov(X, Z) = 0.5 Cov(X, Y ) = 1 V ar(Z) = 3 Cov(Y, Z) = 1 a) Calculate V ar(X + Y ). b) Calculate V ar(Y Z). c) Calculate V ar(2X + Z). 4) The data for this problem are in the file bindat.csv on our Canvas site in the Data folder. The variable y is a binary response and x1 , x2 , x3 , and x4 are continuous predictor variables. Using R, fit the model yi | pi Bernoulli(pi ) ( pi log 1 pi yi | pi independent i = 1, . . . , 189 ) = + 1 xi1 + 2 xi2 + 3 xi3 + 4 xi4 a) Test the hypothesis H0 : 2 = 4 = 0 using a likelihood ratio test. Find the value of the test statistic, the critical value, the p-value, and state your conclusion. b) Construct a 95% confidence interval for 3 2 . Is the result significant

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Real Analysis

Authors: Robert G. Bartle, Donald R. Sherbert

4th edition

471433314, 978-1118135853, 1118135857, 978-1118135860, 1118135865, 978-0471433316

More Books

Students also viewed these Mathematics questions