Biostats Logistic Regression SPSS
PART1
Step-by-Step Guide to Assignment 6.1
This Step-by-Step Guide shows how to manually calculate simple odds ratios (OR), its confidence interval, and interpret the results.
Problem 1. Compute the simple odds ratio of the association of donor’s sex and survival status of the infant.
a. Manually calculate a simple odds ratio to test the hypothesis of no association between donor’s sex and the survival status of the infant, without the inclusion of the variable severity using a 2 x 2 table for sex and survival
Begin with a 2 x 2 table:
|
Donor’s sex |
Survival status designated as Alive (yes) or Dead (Alive no) |
||
|
|
Alive yes |
Alive no |
|
|
Female |
a |
b |
All Exposed (a + b) |
|
Male |
c |
d |
All Not exposed (c + d) |
|
Total |
All Alive (a + c) |
All Not Alive (b + d) |
Total sample |
Using the practice data set:
|
Donor’s sex |
Survival status : Alive (Survived yes) or Dead (Survived no) |
||
|
|
Alive yes |
Alive no |
|
|
Female |
49 |
4 |
Total Female (53) |
|
Male |
101 |
27 |
Total Male (128) |
|
Total |
All Alive (150) |
All Not Alive (31) |
Total sample (181) |
The formula for the odds ratio is the odds of death in females divided by the odds of death in males. Using the letters from the table:
OR= (a/b) ÷ (c/d) or with the numbers it is: (49/4)÷ (101/27) = 12.25÷.3.741 = 3.275
A common shortcut to this calculation is multiplying (a x d) and then dividing this by (b x c) or [(ad)÷(bc)]
OR = 3.275
b. Manually calculate the confidence interval associated with that odds ratio using the appropriate formula.
The formula for a 95% CI for an OR is e lnOR±z * SElnOR. This means that the natural logarithm (base e) is used.
Step 1: Determine the natural logarithm (ln) for the odds ratio (lnOR) using Excel or a scientific calculator.
OR= 3.275 ln(3.275) = 1.186242 (To verify the calculation: On the calculator enter: ln(3.275). Your answer should be 1.186)
Step 2: Determine the standard error (SE).
Using the 2 x 2 table above,
SE= √ (1/a) + (1/b) + (1/c) + (1/d)
= √ (1/49) + (1/4) + (1/101) + (1/27)
= √ 0.020408163 + 0.25 + 0.00990099 + 0.037037037
= √ 0.317346
= 0.563335
Step 3: To calculate SE * z, multiply the SE by z for 95% probability, which is 1.96. The confidence coefficient (z) is from the standard normal distribution; 1.96 for a 95% confidence interval.
SE * z = 0.563335 * 1.96 = 1.104136
Step 4: Complete calculating the exponent formula for both the upper and lower limits:
Upper limit exponent:
= lnOR + SE (z)
= 1.186242 + 1.104136
= 2.290379
Lower limit exponent:
= lnOR – SE (1.96)
=1.186242 - 1.104136
=0.082106
Step 5 Calculate the final 95% CI limits using the exponent function (EXP) in Excel:
Upper CI:
= e2.290379
= 9.87868
Lower CI:
= e0.082106
= 1.08557
Final results:
The lower 95% CI is 1.08557
The upper 95% CI is 9.87868
95% CI = (1.09, 9.88)
c. Manually compute the Chi Square test statistic for this table (10 points).
The 2 x 2 contingency table for the Chi Square statistic is estimated using the formula below:
χ2 = [(ad - bc)2 (a + b + c + d)] / (a + b)(c + d)(b + d)(a + c)
or
χ2 = [(ad - bc)2 (N)] / (a + b)(c + d)(b + d)(a + c)
2 x 2 Table
|
Health Status (e.g Survival Status) |
|||
|
Variable type (e.g. Donor’s Sex) |
Data Type 1 (e.g. Alive) |
Data type 2 (e.g. Dead) |
Total |
|
Female |
a |
b |
a + b |
|
Male |
c |
d |
c + d |
|
Total |
a + c |
b + d |
a + b + c + d = N |
|
Survival Status |
|||
|
Donor’s Sex |
Alive |
Dead |
Total |
|
Female |
49 |
4 |
53 |
|
Male |
101 |
27 |
128 |
|
Total |
150 |
31 |
181 |
χ2 = [(ad - bc)2 (N)] / (a + b)(c + d)(b + d)(a + c)
= [(49 x 27 – 4 x 101)2(181)] / (53)(128)(31)(150)
= [(1323 – 404)2 (181)] / 31545600
= [(919)2(181)] / 31545600
= [(844561)(181)] / 31545600
= 152865541/31545600
= 4.846
The table calculated X2 value is 4.846.
d. Interpret the results. Include an interpretation of the odds ratio and the confidence interval in your response (12 Points).
The odds ratio (OR) is 3.275. This means that females in this sample are more than 3 (OR 3.28) times as likely to live than males. However, the 95% confidence interval (95% CI 1.09, 9.88) is wide, indicating that In 95 out of 100 samples, the ratio of odds can be as low as almost 1 (1.09) and nearly as high as 10 (9.88). The OR is statistically significant because the 95% confidence interval does not include 1.0.
The wide confidence interval indicates the sample size was relatively small. A larger sample size would narrow the confidence interval.