Stratification

Introduction

A stratification estimator is a weighted sum of the differences of sample means across strata. It could be interpreted as the inner expected value in the identification of the ATE, described at the first page for the data examples. Defining nj as the number of individuals in stratum j = 1, ..., J and lj the value of l defining the strata, ATE can be estimated by,

For the estimated ATT in each strata, the weights are instead proportional to the treated distribution:

Using Stratification

Using the RHC data we make a stratified analysis with four subclasses using quartiles of the propensity score.

Therefore, we get that


Example

Here follows an example of how to apply the procedure, described above, using R. To begin with we fit a model for the propensity score.

PS.mod <- glm(as.factor(swang1) ~ transhx + age + surv2md1 + scoma1 + hrt1 + bili1 + wtkilo1 + dnr1 + resp + neuro + hema + ninsclas + income + cat1 + cat2 + psychhx + malighx + aps1, family = binomial, data = rhc)
PS <- fitted.values(PS.mod)

Now, we divide the data by using quartiles of the propensity score.

PS.sub1 <- rhc[which(PS <= quantile(PS)[2]), ]
PS.sub2 <- rhc[which((PS > quantile(PS)[2]) & (PS <= quantile(PS)[3])), ]
PS.sub3 <- rhc[which((PS > quantile(PS)[3]) & (PS <= quantile(PS)[4])), ]
PS.sub4 <- rhc[which(PS > quantile(PS)[4]), ]
nrow(PS.sub1[PS.sub1$swang1 == 1, ]) # Treated in stratum 1
>>
>> 147
nrow(PS.sub1[PS.sub1$swang1 == 0, ]) # Controls in stratum 1
>>
>> 1287
nrow(PS.sub2[PS.sub2$swang1 == 1, ]) # Treated in stratum 2
>>
>> 416
nrow(PS.sub2[PS.sub2$swang1 == 0, ]) # Controls in stratum 2
>>
>> 1018
nrow(PS.sub3[PS.sub3$swang1 == 1, ]) # Treated in stratum 3
>>
>> 679
nrow(PS.sub3[PS.sub3$swang1 == 0, ]) # Controls in stratum 3
>>
>> 754
nrow(PS.sub4[PS.sub4$swang1 == 1, ]) # Treated in stratum 4
>>
>> 942
nrow(PS.sub4[PS.sub4$swang1 == 0, ]) # Controls in stratum 4
>>
>> 492

Then we can comute the stratum difference.

sub1 <- mean(PS.sub1[PS.sub1$swang1 == 1, "outcome"]) - mean(PS.sub1[PS.sub1$swang1 == 0, "outcome"]) # Stratum difference
sub2 <- mean(PS.sub2[PS.sub2$swang1 == 1, "outcome"]) - mean(PS.sub2[PS.sub2$swang1 == 0, "outcome"]) # Stratum difference
sub3 <- mean(PS.sub3[PS.sub3$swang1 == 1, "outcome"]) - mean(PS.sub3[PS.sub3$swang1 == 0, "outcome"]) # Stratum difference
sub4 <- mean(PS.sub4[PS.sub4$swang1 == 1, "outcome"]) - mean(PS.sub4[PS.sub4$swang1 == 0, "outcome"]) # Stratum difference

Finally, the stratification estimaors becomes,

mean(sub1, sub2, sub3, sub4) # Stratification estimator for ATE
>>
>> -0.0610342
sum(sub1 * 147, sub2 * 416, sub3 * 679, sub4 * 942) / sum(147, 146, 679, 942) # Stratification estimator for ATT
>>
>> -0.07933378

Things to consider

Here are some more comments on stratification:

  • Five equal frequency strata (Rosenbaum and Rubin, 1984)
  • Standard errors are often based on simplifying assumptions (Imbens and Wooldridge 2009, Myers and Lois 2012). Bootstrap can be used.
  • Remaining covariate imbalance can be reduced by regression within strata (Lunceford and Davidian, 2004)