Hypothesis test for proportions holding variable constant? 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?
 A: 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.  
