Causal Inference: Propensity Scores & Subgroup Analysis

Author
Affiliation

Joseph Bulbulia

Victoria University of Wellington, New Zealand

Published

May 9, 2023

Downloads

Below is a link to the R script that will allow you to download the data and exercises. Copy the contents on your screen to a new R script, and run the script from the begging. Before class, it will be useful for you to:

  1. Run “source()” file.
  2. Last we you should have downloaded the synthetic data, and placed the dataset in a folder in your R project called “data.”
  3. If you are stuck with this step, let us know.

link to script for this week

Overview

Goals

By the end of this lecture, you will understand the following concepts

  1. Propensity-score weighting: modelling the exposure or treatment, not the outcome.
  2. Doubly robust estimation: model both the treatment and the outcome.
  3. Subgroup analysis by doubly-robust estimation.

Why is this important?

Recall that in psychology our task is to answer some question about how people think and behave. In cross-cultural psychology these questions are typically comparative.

Our first task is clearly define that question. Our second task is to answer that question.

The methods you will learn today will help you to define and answer comparative questions in psychology.

Review: The Fundamental Problem of Causal Inference as a Missing Data Problem

Recall the fundamental problem of causal inference, returning to the question of whether bilingualism improves cognitive abilities:

  • Y_i^{a = 1}: The cognitive ability of child i if they were bilingual. This is the counterfactual outcome when A = 1.
  • Y_i^{a = 0}:: The cognitive ability of child i if they were monolingual. This is the counterfactual outcome when A = 0.

The causal effect of bilingualism on cognitive ability for individual i is then defined as the difference between these potential outcomes:

\text{Causal Effect}_i = Y^{a=1} - Y^{a=0}

We say there is a causal effect if:

Y^{a=1} - Y^{a=0} \neq 0

However, we only observe one of the potential outcomes for each child. The other outcome is not observed because physics prevents a child from both receiving and not receiving bilingual exposure.

The fact that causal contrasts are not observed on individuals is called “The fundamental problem of causal inference.”

Although we typically cannot observe individual causal effects, under certain assumptions we can obtain average causal effects.

\begin{align} E(\delta) = E(Y^{a=1} - Y^{a=0})\\ ~ = E(Y^{a=1}) - E(Y^{a=0}) \\ ~ = ATE \end{align}

We may identify average causal effects from the data when the following assumptions are met:

  • Causal Consistency: The values of exposure under comparisons correspond to well-defined interventions that, in turn, correspond to the versions of treatment in the data.(see: Chatton, Hernan & Robbins)
  • Positivity: The probability of receiving every value of the exposure within all strata of co-variates is greater than zero
  • Exchangeablility: The conditional probability of receiving every value of an exposure level, though not decided by the investigators, depends only on the measured covariates (see: Chatton, Hernan & Robbins)

Further assumptions:

  • No Interference: also known as the Stable Unit Treatment Value Assumption (SUTVA), requires that the treatment given to one unit (e.g., person, group, organization) does not interfere with the potential outcomes of another unit. Put differently, there are no “spillover” effects. Note: this assumption may be thought to be part of causal consistency, namely individual has only one potential outcome under each treatment condition.
  • Correctly specified model: the requirement that the underlying statistical model used to estimate causal effects accurately represents the true relationships between the variables of interest. We say the model should be able to capture “the functional form” of the relationship between the treatment, the outcome, and any covariates. The functional form of the model should be flexible enough to capture the true underlying relationship. If the model’s functional form is incorrect, the estimated causal effects may be biased. Additionally, the model must handle omitted variable bias by including all relevant confounders and should correctly handle missing data. We will return to the bias arising from missing data in the weeks ahead. For now, it is important to note that an assumption of causal inference is that our model is correctly specified.

Subgroup analysis

In causal inference, these two concepts are related but have distinct meanings.

Let Y_{a} denote the counterfactual outcome Y when the experimental intervention A is set to level a. Let Y_{r} denote the counterfactual outcome Y when another experimental intervention R is set to level r. Following VanderWeele (2009), we can define interaction and effect modification as follows:

  1. Interaction (causal interaction) on the difference scale, conditional on confounders L, occurs when:

E(Y^{a1,r1}|L=l) - E(Y^{a0,r1}|L=l) \neq E(Y^{a1,r0}|L=l) - E(Y^{a0,r0}|L=l)

In this case, we are considering a double intervention, and interaction occurs when the combined effect of interventions A and R is not equal to the sum of their individual effects.

  1. Effect Modification (also known as “heterogeneity of treatment effects”) occurs when the causal effect of intervention A varies across different levels of another variable R:

E(Y^{a=1}|R=r_1, L=l) - E(Y^{a=0}|R=r_1, L=l) \neq E(Y^{a=1}|R=r_2, L=l) - E(Y^{a=0}|R=r_2, L=l)

Effect modification indicates that the magnitude of the causal effect of intervention A depends on the level of the modifier variable R. It is important to note that effect modification can be observed even when there is no direct causal interaction between the treatment and the modifier variable.

Thus, interaction in causal inference refers to a situation where the combined effect of two interventions is not equal to the sum of their individual effects. Effect modification, on the other hand, occurs when the causal effect of one intervention varies across different levels of another variable.

By clearly distinguishing between these two concepts, researchers can better ask and answer questions about human thinking and behaviour. For comparative research, we are typically interested in effect-modification which requires subgroup analysis.

Calculating exposure weights (propensity scores) and confounding control (generally)

Recall that last week, we considered confounding control by regression adjustment.

\begin{aligned} ATE = E[Y^{a=1}|L = l] - E[Y^{a=0}|L = l] ~ \text{for any value}~l \end{aligned}

“We say that a set L of measured non-descendants of L is a sufficient set for confounding adjustment when conditioning on L blocks all backdoor paths–that is, the treated and the untreated are exchangeable within levels of L” (Hernan & Robins, What IF p. 86)

The equation you provided represents the average treatment effect (ATE) when conditioning on a set of covariates L:

\begin{aligned} ATE = E[Y^{a=1}|L = l] - E[Y^{a=0}|L = l] ~ \text{for any value}~l \end{aligned}

This formula calculates the expected difference in outcomes between treated (a=1) and untreated (a=0) groups, given a specific value of the covariates l.

Inverse probability of treatment weighting (IPTW) is a technique used in causal inference to estimate the average treatment effect (ATE) when comparing two groups in observational studies. The idea is to create a pseudo-population where the treatment assignment is independent of the observed covariates by assigning weights to each individual based on their propensity scores (i.e., the probability of receiving the treatment given their covariates).

Let’s denote the treatment indicator by A, where A = 1 if an individual receives treatment and A = 0otherwise. Let L represent the vector of observed covariates, and Y^a be the potential outcomes. The propensity score, e(L), is defined as the probability of receiving treatment given the observed covariates:

e(L) = P(A = 1 \mid L)

To estimate the ATE using IPTW, we first compute the inverse probability of treatment weights, which are defined as:

v_i = \frac{A_i}{e(L_i)} + \frac{1 - A_i}{1 - e(L_i)}

where v_i is the IPTW weight for individual i, A_i is the treatment indicator for individual i, and e(L_i) is the propensity score for individual i.

Calculating exposure weights (propensity scores) and confounding control in subgroups

When conducting weighted analyses in subgroups, we should estimate propensity scores within subgroups. The propensity score e(L, G) is the conditional probability of the exposure A = 1, given the covariates L and subgroup indicator G. This can be modelled using a statistical model, such as logistic regression, or one of the many other methods for obtaining balance (see Greifer’s work, described next week).

We may say hat:

\hat{e} = P(A = 1 | L, G) = f_A(L, G; \theta_A)

Here, f_A(L, G; \theta_A) is a function (statistical model) over Y that estimates the probability of the exposure A = 1 given covariates L and subgroup G. Then, we calculate the weights for each individual, denoted as v, using the estimated propensity score:

v = \begin{cases} \frac{1}{e} & \text{if } A = 1 \\ \frac{1}{1-e} & \text{if } A = 0 \end{cases}

Thus, v depends on A, and is calculated as the inverse of the propensity score for exposed individuals and as the inverse of 1-e for unexposed individuals.

Note again that that we estimate propensity scores separately within strata of the subgroup for whom we are interested in effect modification. v is the weight for each individual in a given subgroup G. To foreshadow our work next week, we will fit models such that we may estimate contrast for the causal effects within groups (\hat{\delta_{g}}, \hat{\delta_{g^{\prime}}}\dots); having obtained the group-level estimands, we may then obtain estimates for group-wise differences: (\hat{\gamma})

Such that,

\hat{\gamma} = \overbrace{\big( \hat{E}[Y(a)|G=g] - \hat{E}[Y(a^{\prime})|G=g] \big)}^{\hat{\delta_g}} - \overbrace{\big(\hat{E}[Y(a^{\prime})|G=g^{\prime}]- \hat{E}[Y(a)|G=g^{\prime}]\big)}^{\hat{\delta_{g^{\prime}}}}

We again will use simulation-based inference methods to compute standard errors and confidence intervals [@greifer2023].

Do not worry! All will be explained next week.

Doubly Robust Estimation

We can combine regression based estimation and doubly robust estimation. I will walk you through the steps in today’s exercises. The TL;DR is this: doubly robust estimation leads to lower reliance on correct model specification. If either the PS model or the regression model is correctly specified, the model will be unbiased – if the other assumptions of causal inference are met.

We cannot know whether these assumptions are met, we will need to do sensitivity analysis, the topic of next week.

In today’s workbook, you will learn how to conduct doubly robust subgroup analysis.

Readings:

Noah Griefer’s Software and Blogs: https://ngreifer.github.io/blog/subgroup-analysis-psm/

Reuse

MIT