








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









State the alpha level that you are using for any statistical tests carried out for this homework. Don’t forget to include the test statistic, df, and p-value for the results of any statistical tests that you report. I used alpha = 0.05 for all statistical tests. The questions in this homework use the Afifi data set (b510.afifi) which you created for homework 4, or you can download this SAS data set from my web page (http://www.umich.edu/ ~kwelch).
There is a significant association between being in shock and dying Pearson Chi-square (1df) = 17.63, p<0.0001. c) What is the risk ratio of dying, for a patient who was in shock compared to a patient who was not in shock? Include the risk ratio and the 95% confidence interval calculated by SAS. Also, calculate this risk ratio (but not the 95% CI) by hand and include your work. The risk ratio of dying for those in shock compared to those patients not in shock is 4.7383, with 95% CI = (1.91, 17.28). The risk ratio can be calculated by hand as the probability of dying if you are in shock divided by the probability of dying if you are not in shock= .5063/.0882 =5.740. d) Interpret the risk ratio in words. This risk ratio means that the probability of dying if you are in shock is about 5.7 times greater than the probability of dying if you are not in shock. e) What is the Odds Ratio of dying, for a patient who was in shock compared to a patient who was not in shock? Please include the odds ratio and the 95% confidence interval calculated by SAS. Also, calculate this odds ratio by hand (you don't have to calculate the CI by hand) and show your work. The odds ratio is 10.593, with 95% CI=(2.99,37.53). The odds ratio can be calculated as the odds of dying if you are in shock divided by the odds of dying if you are not in shock = (.5063/.4937)/(.0882/.9118) = 1.0255/.09673 = 10.601. f) Interpret the odds ratio in words. The odds ratio means that the odds of dying for patients who are in shock are about 10.6 times higher than the odds of dying for patients who are not in shock. g) Are the risk ratio and odds ratio similar for this table? Why or why not? No, the odds ratio and risk ratio are not similar. In fact, the odds ratio is about twice as large as the risk ratio. This is because the probability of dying is not rare in both groups. It is about 50% in the shock group, and much less in the non-shock group. h) Include the output from this cross-tab in your write-up. shockcat diedcat Frequency | Percent | Row Pct | Col Pct |died |lived | Total -------------+--------+--------+ In Shock | 40 | 39 | 79 | 35.40 | 34.51 | 69. | 50.63 | 49.37 | | 93.02 | 55.71 | -------------+--------+--------+ Not in Shock | 3 | 31 | 34 | 2.65 | 27.43 | 30. | 8.82 | 91.18 | | 6.98 | 44.29 | -------------+--------+--------+ Total 43 70 113 38.05 61.95 100. Statistics for Table of shockcat by diedcat Statistic DF Value Prob
Chi-Square 1 17.6265 <. Likelihood Ratio Chi-Square 1 20.3389 <. Continuity Adj. Chi-Square 1 15.8975 <. Mantel-Haenszel Chi-Square 1 17.4705 <. Phi Coefficient 0.
Contingency Coefficient 0. Cramer's V 0. Fisher's Exact Test
Cell (1,1) Frequency (F) 40 Left-sided Pr <= F 1. Right-sided Pr >= F 1.142E- Table Probability (P) 1.043E- Two-sided Pr <= P 1.569E- Statistics for Table of shockcat by diedcat Estimates of the Relative Risk (Row1/Row2) Type of Study Value 95% Confidence Limits
Case-Control (Odds Ratio) 10.5983 2.9928 37. Cohort (Col1 Risk) 5.7384 1.9059 17. Cohort (Col2 Risk) 0.5414 0.4231 0. Sample Size = 113
43.75% of patients in shock type 6 (neurogenic shock) died 70.00% of patients in shock type 7 (other shock) died. b) Is there a significant relationship between SHOKTYPE and whether the patient died? Yes, there is a significant relationship between SHOKTYPE and whether the patient died, Pearson chi-square test statistic = 21.1971, with 5 df, p=0.0007. c) Include the output from this cross-tab in your write-up. SHOKTYPE diedcat Frequency | Percent | Row Pct | Col Pct |died |lived | Total ------------+--------+--------+ Non-shock | 3 | 31 | 34 | 2.65 | 27.43 | 30. | 8.82 | 91.18 | | 6.98 | 44.29 | ------------+--------+--------+ Hypovolemic | 10 | 7 | 17 | 8.85 | 6.19 | 15. | 58.82 | 41.18 | | 23.26 | 10.00 | ------------+--------+--------+ Cardiogenic | 10 | 10 | 20 | 8.85 | 8.85 | 17. | 50.00 | 50.00 | | 23.26 | 14.29 | ------------+--------+--------+ Bacterial | 6 | 10 | 16 | 5.31 | 8.85 | 14. | 37.50 | 62.50 | | 13.95 | 14.29 | ------------+--------+--------+ Neurogenic | 7 | 9 | 16 | 6.19 | 7.96 | 14. | 43.75 | 56.25 | | 16.28 | 12.86 | ------------+--------+--------+ Other | 7 | 3 | 10 | 6.19 | 2.65 | 8. | 70.00 | 30.00 | | 16.28 | 4.29 | ------------+--------+--------+ Total 43 70 113 38.05 61.95 100. Statistics for Table of SHOKTYPE by diedcat Statistic DF Value Prob
Chi-Square 5 21.1971 0. Likelihood Ratio Chi-Square 5 23.7654 0. Mantel-Haenszel Chi-Square 1 9.9754 0. Phi Coefficient 0. Contingency Coefficient 0. Cramer's V 0. Sample Size = 113
a) You will need to include SHOKTYPE in a class statement in your SAS code. Use SHOKTYPE=2 (non-shock) as the reference category. b) Check to be sure that SHOKTYPE=2 is the reference category for your model. How do you know that you have the correct reference category? We can see that Shoktype=2 is the reference category, because all the dummy variables included for shoktype have a value of zero for Shoktype=2. c) Which categories of SHOKTYPE have significantly different probabilities of dying than the non-shock group (SHOKTYPE=2)? Patients in each of the categories of shock (shoktype=3 through 7) have significantly greater probability of dying than patients not in shock (shoktype=2). For shoktype=3, the Wald chi- square with 1 df = 11.91, p=.0006. For shoktype=4, the Wald chi-sqaure with 1df = 9.64, p=.0019. For shoktype=5, the Wald chi-square with 1df = 5.27, p=.0218. For shoktype=6, the Wald chi-square with 1 df = 7.01, p=.0081. For shoktype=7, the Wald chi-sqaure with 1 df =12.03, p=.0005. d) What is the (maximum rescaled) pseudo R-square for this model? The maximum rescaled pseudo R-square for this model is 0.2580. e) Is there a significant overall relationship between SHOKTYPE and DIED? Report the Global Likelihood Ratio test of Beta=0. Also, report the Wald chi-square test from the table of Type 3 tests. Are these test results similar? Yes, there is a significant overall relationship between SHOKTYPE and DIED. The global Likelihood ratio chi-square test statistic is Ratio is 23.7654 with 5df, and p=0.0002. f) Save the predicted probabilities from this model. What is the predicted probability of dying for each category of shock type? Compare these predicted probabilities with the percentage who died for each shock type in the cross-tab in question 4.
The predicted probabilities of dying for each category of shock type are: SHOKTYPE predict
2 0. 3 0. 4 0. 5 0. 6 0. 7 0. g) Include the output from this logistic regression in your write-up. The LOGISTIC Procedure Model Information
Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits SHOKTYPE 3 vs 2 14.762 3.200 68. SHOKTYPE 4 vs 2 10.333 2.366 45. SHOKTYPE 5 vs 2 6.200 1.305 29. SHOKTYPE 6 vs 2 8.037 1.718 37. SHOKTYPE 7 vs 2 24.111 3.993 145.
a) What is the (maximum rescaled) pseudo R-square for this model? The maximum rescaled pseudo R-square for this model is .1628. b) Interpret the log-odds for SBP1 in this model? Why is it important that this estimated coefficient is negative? (Explain in words what this negative coefficient means). The estimated log odds for SBP1 is -.0261. This means that the log-odds of dying, and hence the probability of dying, decrease for each one-unit increase in SBP1. The importance of this estimate being negative is that having higher SBP1 is protective. c) What is the Odds Ratio for SBP1. i. Interpret this Odds ratio The odds ratio for SBP1 is 0.974, which means that the estimated odds of dying decrease by about 2.6% for each one-unit increase in SBP1. (100*.974 – 100 = 97.4-100 = -2.6%). d) Refit the model, but include SHOKTYPE, and SBP1 both as predictors. e) Is there a significant relationship between SHOKTYPE and the probability of dying in this new model? (look at the type3 test for SHOKTYPE). The relationship between SHOKTYPE and dying is significant in this model, after controlling for SBP1: Wald chi-square test statistic with 5df =11.9418, p= 0.0356. f) Is there a significant relationship between SBP1 and the probability of dying in this new model? (look at the type3 test for SBP1). Yes, there is a significant relationship between SBP1 and dying, after controlling for SHOKTYPE, Wald chi-square test statistic with 1df = 4.8641, p=0.0274. g) Include the output from both models fitted for this question in your write-up. The LOGISTIC Procedure Model Information Data Set B510.AFIFI Response Variable died Number of Response Levels 2 Model binary logit Optimization Technique Fisher's scoring Number of Observations Read 113 Number of Observations Used 111
Response Profile Ordered Total Value died Frequency 1 1 43 2 0 68 Probability modeled is died=1. NOTE: 2 observations were deleted due to missing values for the response or explanatory variables. Model Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Intercept Intercept and Criterion Only Covariates AIC 150.199 138. SC 152.909 143. -2 Log L 148.199 134. R-Square 0.1199 Max-rescaled R-Square 0. Testing Global Null Hypothesis: BETA= Test Chi-Square DF Pr > ChiSq Likelihood Ratio 14.1814 1 0. Score 13.4150 1 0. Wald 11.9840 1 0. Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept 1 2.2380 0.7892 8.0416 0. SBP1 1 -0.0261 0.00754 11.9840 0. Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits SBP1 0.974 0.960 0.
Model Information Data Set B510.AFIFI Response Variable died Number of Response Levels 2 Model binary logit Optimization Technique Fisher's scoring Number of Observations Read 113 Number of Observations Used 111 Response Profile
SHOKTYPE 4 vs 2 7.570 1.614 35. SHOKTYPE 5 vs 2 3.476 0.679 17. SHOKTYPE 6 vs 2 4.602 0.907 23. SHOKTYPE 7 vs 2 17.111 2.685 109.
Statistic (S) 31. DF 1 Pr > S <. Sample Size = 113