2
$\begingroup$

I have a data set that looks like this:

GENDER    SMOKER    SURVIVED    DIED
male      yes       341         23
male      no        231         11
female    yes       378         19
female    no        476         15

The question I would like to answer is: "Holding gender constant, is there strong evidence to believe there are more deaths among smokers rather than non-smokers?" What test/method is the most appropriate for this and how do you interpret its results? I was thinking I could run 2 chi-square tests, one for each gender, to check if the proportions of survived vs. died for the 2 groups smokers vs. non-smokers are statistically different from one another. Is there a better way of doing this?

$\endgroup$
1
  • $\begingroup$ Note that while @gung gave a great answer, that "logistic regression" is not the automatic choice for binary outcome regression models. For example, in econometrics, probit regression models are far more likely. Complementary-log log models make different assumptions about the proportionality of the effects compared to logistic regression. $\endgroup$
    – Alexis
    Commented Nov 15, 2016 at 18:07

1 Answer 1

2
$\begingroup$

To test something while controlling for a covariate, we typically use some type of regression model. Since your response data are binomial, you should use logistic regression. Your situation is straightforward, and the model and test are fairly easy to do. Here is an analysis of your data done in R:

d = read.table(text="GENDER    SMOKER    SURVIVED    DIED
male      yes       341         23
male      no        231         11
female    yes       378         19
female    no        476         15", header=T)

summary(glm(cbind(DIED, SURVIVED)~SMOKER+GENDER, d, family=binomial))
# Call:
# glm(formula = cbind(DIED, SURVIVED) ~ SMOKER + GENDER, family = binomial, 
#     data = d)
# 
# Deviance Residuals: 
#        1         2         3         4  
# -0.09533   0.13919   0.10545  -0.11564  
# 
# Coefficients:
#             Estimate Std. Error z value Pr(>|z|)    
# (Intercept)  -3.4272     0.2240 -15.300   <2e-16 ***
# SMOKERyes     0.4118     0.2580   1.596    0.110    
# GENDERmale    0.3394     0.2514   1.350    0.177    
# ---
# Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# 
# (Dispersion parameter for binomial family taken to be 1)
# 
#     Null deviance: 5.244573  on 3  degrees of freedom
# Residual deviance: 0.052953  on 1  degrees of freedom
# AIC: 24.441
# 
# Number of Fisher Scoring iterations: 3

Controlling for gender, the Wald p-value for smoking is 0.11.

$\endgroup$
4
  • 2
    $\begingroup$ Caveat: "should use logistic regression or complimentary log-log regression, or probit regression." These are all regressions for binary outcomes. (While these tend to give similar results, they have somewhat different assumptions.). $\endgroup$
    – Alexis
    Commented Nov 15, 2016 at 16:51
  • $\begingroup$ That's a good point, @Alexis. With all categorical predictors, I think they would all just fit the cell proportions, though. $\endgroup$ Commented Nov 15, 2016 at 16:54
  • 1
    $\begingroup$ @gung: Not if the model's not saturated - so they'd be equivalent in this case if the interaction between 'smoker' & 'gender' predictors were also in the model. $\endgroup$
    – Scortchi
    Commented Nov 15, 2016 at 17:14
  • $\begingroup$ That's true, @Scortchi. There are additional subtleties here. $\endgroup$ Commented Nov 15, 2016 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.