For an observational study to compare two groups with respect to a dichotomous outcome variable, the design strategy of matching observational units with respect to a potential confounding variable X is compared with the strategy of selecting independent samples with possible poststratification on X for bias control. … It is found that proper understanding requires that the prospective and the retrospective study designs be separately considered, and that in certain circumstances the effect of matching on design efficiency is entirely different for the two designs. (Samuels 1981)
When exchangeability (no confounding) and the analytic cohort condition (no selection bias) hold given a set of variables \(C\), then the conditional estimates of risk in the exposed and unexposed in the study sample are unbiased estimates of the causal risks of disease under exposure and no exposure in the eligible population. We have several ways to summarize the causal effect of exposure on disease:
If there is no effect measure modification on the desired scale, we can use stratified analysis (e.g., Mantel-Haenszel) or a regression model to estimate a common conditional measure of association given \(C\).
If there is effect measure modification, we can estimate stratum-specific conditional measures of association given \(C\). This can be done nonparametrically or using a regression model with interaction terms for \(X\) and \(C\).
Whether or not there is effect modification, we can use standardization to estimate marginal causal risks of disease. These marginal causal risks can be used to estimate marginal causal effects. If there is no effect measure modification and the measure is collapsible, the standardized measure of association will equal the common conditional measure of association given \(C\).
If the case-control condition holds but not the cohort condition, then our only choice is to estimate conditional odds ratios given \(C\). Depending on the selection of controls, these can approximate conditional risk ratios or hazard ratios given \(C\).
Sometimes \(C\) may consist of more than one variable. When we match on multiple covariates (e.g., age and biological sex), we match participants who have similar values for all of the matching variables. When \(C\) has many levels, some strata may have no members from one of the two exposure groups. This can result in estimates that do not converge or have high variance.
Matching can be used to ensure that we have individuals from both exposure or treatment groups in all levels of \(C\). When we match in a cohort study, we ensure that there is at least one individual from both treatment or exposure groups in each level of \(C\). When we match in a case-control study, we ensure that there is at least one case and one control from all levels of \(C\). It turns out that matching has different consequences in cohort and case-control studies:
In a cohort study, matching is generally used to prevent confounding by ensuring that both exposure or treatment groups have the same distribution of \(C\). It is often not necessary to stratify or standardize by \(C\), except possibly to generalize to the eligible population.
In a case-control study, matching does not prevent confounding by \(C\). Instead, it is used to improve statistical efficiency in an analysis stratified by \(C\).
Causal graphs can be used to understand these differences. In all cases, it is important to weigh the advantages and disadvantages of matching against those of analytical control for confounding through stratification or weighting.
20.0.1 Matching in a cohort study
In a matched cohort study, matching ensures that the exposure groups have the same distribution of \(C\). If exposure is less common than non-exposure, then we choose one or more non-exposed individuals from the same stratum of \(C\) for each exposed individual. Figure 20.1 shows a single-world intervention graph (SWIG) for a cohort study matched on a confounder \(C\). The cohort condition holds given \(C\) because \(S^x \indep D^x \given X, C\).
Code
matching-swig-coh.R
# DAG for cohort study matched on a confounder# load R packageslibrary(dagitty)library(ggdag, warn.conflicts =FALSE)library(ggplot2)# define the DAGcohort <-dagitty('dag{ C -> D C -> S C -> X x -> D x -> S}')# generate data for plotting DAG using ggplot()# Use geom_dag_label() for adjusted variables to get a box around them.coordinates(cohort) <-list(x =c(C =0, X =0.9, x =1.1, S =2, D =3),y =c(C =0, X =0, x =0, S =-0.5, D =0))cohort_dat <-control_for(cohort, c("C", "x"), activate_colliders =FALSE)label(cohort_dat) <-c("C"="C", "X"="X", "x"="x","D"="D^x", "S"="S^x")cohort_adj <-filter(cohort_dat, adjusted =="adjusted")cohort_unadj <-filter(cohort_dat, adjusted =="unadjusted")# plot DAG with ggplot() to allow for boxes and curved arrows(ggplot(cohort_dat, aes(x = x, y = y, xend = xend, yend = yend))+theme_dag_gray_grid()+coord_equal()+geom_dag_label(data = cohort_adj, parse =TRUE, size =8, fill =NA,label.padding =unit(0.15, "lines"))+geom_dag_text(aes(label = label), data = cohort_unadj, parse =TRUE,color ="black", size =8)+geom_dag_edges_arc(curvature =c(0.25, -0.15, 0, 0, 0))+annotate("text", x =1, y =0.01, size =8, label ="|"))
Figure 20.1: SWIG for selection a cohort study matched on a confounder \(C\). Exchangeability and the analytic cohort condition hold given \(C\). Because of matching, both exposure groups have the same distribution of \(C\).
Matching ensures that the distribution of \(C\) is the same in both exposure groups and in the study sample, so a crude measure of association based on disease risks is implicitly standardized to this distribution of \(C\). Therefore, adjustment for \(C\) is not necessary to estimate the marginal causal effect of \(X\) on \(D\) in the study sample (i.e., in a standard population with the same distribution of \(C\) as the study sample). However, generalization to the eligible population (or to the exposed or unexposed groups in the eligible population) can require adjustment for \(C\) if there is effect measure modification or noncollapsibility. If \(C\) is conditionally independent of \(S\) given \(X = 1\), then the distribution of \(C\) in the study sample is the same as the distribution of \(C\) among the exposed in the eligible population. In this, the marginal causal effect in the study sample is a consistent estimate of the marginal causal effect among the exposed in the eligible population.
20.0.2 Matching on non-confounders
If we remove the edge from \(C\) to \(X\) in Figure 20.1, then \(C\) is associated with \(D\) but not a confounder. Because of the path \(S^x \leftarrow C \rightarrow D^x\), we still need to condition on \(C\) to prevent selection bias. However, this is necessary only because of the path \(C \rightarrow S^x\) caused by matching. The result is the same as before: The causal effect of \(X\) on \(D\) in a standard population with the same distribution of \(C\) as the study sample can be estimated without adjustment for \(C\), but generalization to the eligible population requires adjustment for \(C\) if there is effect modification or noncollapsibility.
If we remove the edge from \(C\) to \(D\) in Figure~[fig:mcohort], then \(C\) is associated with \(X\) but not a confounder. In this case, the cohort condition holds without conditioning on \(C\), so no adjustment for \(C\) is necessary for estimation of marginal causal effects or generalization to the eligible population.
20.0.3 Matching and efficiency
In a clinical trial, blocking refers to assigning treatment within groups defined by baseline variables. In pairwise blocking, participants are grouped into pairs based on baseline variables and treatment is assigned to one person in each pair. Blocking usually improves the efficiency of a clinical trial when the blocks are defined by risk factors for disease.
By analogy to blocking in a clinical trial, it is often thought that matching will improve the efficiency of a cohort study. However, Greenland and Morgenstern (1990) showed that this is not always the case. In particular, matching in a cohort study can change the distribution of \(C\) in the study sample in a way that increases the variance of the effect estimate. By contrast, blocking never changes the distribution of \(C\) in a clinical trial. The key difference is that blocking in a clinical trial is a method of treatment assignment while matching in an observational cohort study is a method of selecting study participants. Matching can increase or decrease efficiency in a cohort study, and it will almost alway make participant selection more difficult.
20.1 Matching in a case-control study
Figure 20.2 shows a SWIG for a case-control study matched on a confounder \(C\). The cohort condition fails because \(S\) is a child of \(D\), but the case-control condition holds given \(C\) because \(S^d \indep X \given D, C\). It follows that our measure of association must be based on the prevalence of exposure in cases and controls and that we must control for \(C\) to avoid selection bias.
Code
matching-swig-cc.R
# DAG for cohort study matched on a confounder# load R packageslibrary(dagitty)library(ggdag)library(ggplot2)# define the DAGcasecontrol <-dagitty('dag{ C -> D C -> S C -> X d -> S X -> D}')# generate data for plotting DAG using ggplot()# Use geom_dag_label() for adjusted variables to get a box around them.coordinates(casecontrol) <-list(x =c(C =0, X =0.9, D =1.9, d =2.1, S =3),y =c(C =0, X =0, D =0, d =0, S =-0.4))cc_dat <-control_for(casecontrol, c("C", "d"), activate_colliders =FALSE)label(cc_dat) <-c("C"="C", "X"="X", "x"="x", "D"="D","d"="d", "S"="S^d")cc_adj <-filter(cc_dat, adjusted =="adjusted")cc_unadj <-filter(cc_dat, adjusted =="unadjusted")# plot DAG with ggplot() to allow for boxes and curved arrows(ggplot(cc_dat, aes(x = x, y = y, xend = xend, yend = yend))+theme_dag_gray_grid()+coord_equal()+geom_dag_label(data = cc_adj, parse =TRUE, size =8, fill =NA,label.padding =unit(0.15, "lines"))+geom_dag_text(aes(label = label), data = cc_unadj, parse =TRUE,color ="black", size =8)+geom_dag_edges_arc(curvature =c(0.25, -0.1, 0, 0, 0))+annotate("text", x =2, y =0.01, size =8, label ="|"))
Figure 20.2: SWIG for a case-control study matched on a confounder \(C\). The analytic case-control condition holds given \(C\). Because of matching, the case and control groups have the same distribution of \(C\).
In a case-control study, matching ensures that the distribution of \(C\) is equal in the case and control groups, not in the exposure groups. Because the exposure groups have different distributions of \(C\), the crude odds ratio cannot be interpreted as a causal effect of exposure within the study sample. The \(C\)-conditional odds ratios have a causal interpretation, and they are identical (up to random variation) in the study sample and the eligible population. Away from the null, the \(C\)-conditional odds ratios in the eligible population differ from the \(C\)-marginal odds ratio in the study sample even when there is no effect modification, so adjustment for \(C\) is necessary.
20.1.1 Matching on non-confounders
If we remove the edge from \(C\) to \(X\) in Figure 20.2, then \(C\) is associated with \(D\) but not a confounder. Thus, both the marginal odds ratio and conditional odds ratios given \(C\) in the eligible population have causal interpretations. Conditioning on the collider at \(D\) opens the path \(X \rightarrow D \leftarrow C \rightarrow S^d\), so the case-control condition holds only given \(C\). Away from the null, the marginal odds ratios and conditional odds ratios given \(C\) in the eligible population differ even when there is no effect modification by \(C\). When there is no effect modification, the conditional odds ratio given \(C\) in the eligible population matches the marginal odds ratio in the study sample. Thus, matching on \(C\) is harmful if the marginal odds ratio in the eligible population is of primary interest. Under the null, the case-control condition holds without conditioning on \(C\) so no adjustment for \(C\) is necessary.
If we remove the edge from \(C\) to \(D\) in Figure 20.2, then \(C\) is associated with \(X\) but not a confounder. However, the case-control condition holds only given \(C\) because of the path \(X \leftarrow C \rightarrow S^d\). When there is no effect modification by \(C\), the marginal odds ratio and conditional odds ratios given \(C\) in the eligible population are equal. In the study sample, the marginal odds ratio and conditional odds ratio given \(C\) differ away from the null even when there is no effect modification. Under the null, the marginal odds ratios are the same (up to random variation) in the study sample and the eligible population. Thus, adjustment for \(C\) is necessary away from the null but not under the null.
20.1.2 Matching and efficency
In a case-control study, matching improves efficiency by ensuring that there is balance between cases and controls in the strata defined by \(C\). This can improve efficiency even when these strata are not sparse. Earlier, we saw that the power of a case-control study is maximized for a fixed total number of participants when we have equal numbers of cases and controls (Jewell 2003). Because controls are generally easier to find than cases of a rare disease, it is common to enroll 3–5 controls per case. Matching ensures that no strata of \(C\) contain only cases, in which case they would be discarded in a Mantel-Haenszel estimate (and possibly in a GLM as well). Although matching on a confounder consistently improves the efficiency of case-control studies, its use must be balanced against the additional difficulty of finding controls and the availability of analytical methods such as stratification and weighting that can control for confounding.
Matching on a non-confounder necessitates a stratified analysis that can lead to a loss of statistical efficiency compared to a non-matched case control study with the same number of participants.
20.2 Overmatching
Matching can be useful, but it can also be harmful. Harmful matching is called overmatching, and it takes three forms (Rothman, Greenland, and Lash 2008): matching that reduces statistical efficiency, matching that induces bias, and matching that reduces cost efficiency.
Statistical efficiency is about the precision of a causal effect estimate achieved with a given total number of participants. In a cohort study, matching prevents confounding but its effect on statistical efficiency can be difficult to predict. In a case-control study, it consistently improves statistical efficency for a given total number of participants, but it might harm overall efficiency if it leads to a lower total number of participants. It also necessitates a stratified analysis, which can reduce statistical efficiency if stratification by \(C\) would not otherwise be needed.
Matching on a causal intermediate or a collider can cause bias just like stratifying on a causal intermediate or a collider. Matching should generally be done only on variables that are likely to be important confounders.
Cost efficiency is about the precision of a causal effect estimate achieved with a given total cost of a study. Some methods of recruiting controls lend themselves naturally to matching by neighborhood, family, friends etc. However, the potential for bias or loss of statistical efficiency should always be balanced against the convenience of control recruitment. It is also important to calibrate the closeness of the matching needed to control confounding. Requiring extremely close matches can greatly increase cost with little improvement in control for confounding or precision.
Greenland, Sander, and Hal Morgenstern. 1990. “Matching and Efficiency in Cohort Studies.”American Journal of Epidemiology 131 (1): 151–59.
Jewell, Nicholas P. 2003. Statistics for Epidemiology. CRC Press.
Rothman, Kenneth J, Sander Greenland, and Timothy L Lash. 2008. Modern Epidemiology. Lippincott Williams & Wilkins.
Samuels, Myra L. 1981. “Matching and Design Efficiency in Epidemiological Studies.”Biometrika 68 (3): 577–88.