Source-linked AI summary
MatchThem:: Matching and Weighting after Multiple Imputation
Farhad Pishgar, Noah Greifer, Clémence Leyrat, Elizabeth Stuart
TL;DR
Matching and weighting can balance confounders in observational studies, but cannot be directly applied to datasets with missing values, and comprehensive software for multiply imputed data was lacking. The paper reviews this problem, proposes a five-action framework and balance-assessment practices, and introduces MatchThem. It recommends evaluating balance across imputed datasets, while noting that multiple imputation is justified under ignorable missingness conditions.
Problem
Matching and weighting are not directly applicable to datasets with missing values, and comprehensive software facilitating these methods with multiply imputed data was lacking.
Source: §1 · p. 3, §2.1 · p. 5Method
The paper reviews within and across matching or weighting approaches, recommends balance-assessment practices, and presents the MatchThem R package and a five-action workflow.
Source: §1 · p. 3, §4 · p. 10Results
The paper proposes mapping matching and weighting with multiply imputed data to five actions and recommends assessing balance within and across imputed datasets.
Source: §3.3 · p. 8, §6 · p. 17Takeaways & Limitations
Assessing balance in each imputed dataset as well as on average helps address pooled-estimate bias and precision concerns.
Source: §3.3 · p. 8Multiple imputation is justified when missingness is ignorable, including MCAR or MAR conditions described by the paper.
Source: §3.1 · p. 7
Abstract
from arXiv · showhide
Balancing the distributions of the confounders across the exposure levels in an observational study through matching or weighting is an accepted method to control for confounding due to these variables when estimating the association between an exposure and outcome and to reduce the degree of dependence on certain modeling assumptions. Despite the increasing popularity in practice, these procedures cannot be immediately applied to datasets with missing values. Multiple imputation of the missing data is a popular approach to account for missing values while preserving the number of units in the dataset and accounting for the uncertainty in the missing values. However, to the best of our knowledge, there is no comprehensive matching and weighting software that can be easily implemented with multiply imputed datasets. In this paper, we review this problem and suggest a framework to map out the matching and weighting multiply imputed datasets to 5 actions as well as the best practices to assess balance in these datasets after matching and weighting. We also illustrate these approaches using a companion package for R, MatchThem.
1. Introduction
Matching or weighting can balance confounders across exposure groups, but these methods cannot be directly applied to datasets with missing values. The paper reviews the problem, recommends practices, and introduces MatchThem for matching and weighting with multiply imputed data.
1. Introduction
- Matching or weighting balances confounder distributions across exposure groups, helping control confounding and reduce dependence on some modeling assumptions when estimating causal effects.Source: §1 · p. 3
- The paper reviews matching and weighting with multiply imputed data, describes implementation best practices, and introduces MatchThem to facilitate these procedures and effect estimation.Source: §1 · p. 3
1.1. Notation
- The paper focuses on procedures after imputation, which creates m complete datasets indexed by j, with units indexed by i.Source: §1.1 · pp. 3–4
1.2. Software Requirements
- MatchThem is an R package requiring R version 3.5.0 or later.Source: §1.2 · p. 4
2. Matching and Weighting
Matching and weighting aim to make exposure groups comparable on potential confounders, but missing values obstruct their direct application. Multiple imputation is a popular alternative to complete-case analysis when missingness assumptions or retained sample size are concerns.
2. Matching and Weighting
- Matching seeks comparable confounder distributions by duplicating, selecting, or dropping units; weighting assigns weights to align confounder distributions across exposure groups.Source: §2 · p. 5
- Propensity scores, the predicted probability of treatment given potential confounders, are a popular distance measure for matching and a common basis for inverse probability weights.Source: §2 · p. 5
2.1. Missing Data
- Missing exposure or confounder values prevent many matching or weighting procedures from searching for comparable units or predicting treatment from covariates.Source: §2.1 · p. 5
- Complete-case analysis may be unjustified when missingness is not completely at random and may leave few units, while multiple imputation preserves the dataset’s unit count.Source: §2.1 · p. 6
3. Matching and Weighting Multiply Imputed Datasets
The paper outlines ways to match or weight multiply imputed datasets and recommends assessing balance within and across those datasets. Its guidance distinguishes the within and across approaches and emphasizes that average balance alone may not preserve precision.
3.1. Multiply Imputing Missing Data
- Multiple imputation replaces missing values with plausible values reflecting uncertainty, producing m datasets; it is justified under ignorable missingness, including MCAR or MAR conditions described here.Source: §3.1 · p. 7
- The general multiple-imputation framework imputes values, analyzes each completed dataset separately, and pools results using standard combining rules.Source: §3.1 · p. 7
3.2. Matching and Weighting Multiply Imputed Datasets
- The within approach matches or weights separately in each imputed dataset and pools the resulting effect estimates, whereas the across approach averages propensity scores before matching or weighting.Source: §3.2 · pp. 7–8
- Across common scenarios, the across approach has inferior statistical performance to the within approach, is most effective when outcomes are excluded from covariate imputation, and cannot use methods without a single distance measure.The passage notes that statistical evidence favors including the outcome when imputing covariates.Source: §3.2 · p. 8
3.3. Assessing Balance in Multiply Imputed Datasets
- Balance is similarity in confounder distributions across exposure groups; assess it using SMD and KS statistics, including covariate interactions and powers.Report balance in a table or plot, such as a Love plot.Source: §3.3 · pp. 8–9
- Compute SMDs within each imputed dataset and seek averages near zero, since opposing dataset-level biases may cancel while imbalance within datasets can reduce pooled-estimate precision.Source: §3.3 · pp. 8–9
- Also examine average and maximum absolute SMDs and KS statistics across datasets, alongside each dataset’s statistics, to identify departures from balance.Source: §3.3 · p. 9
4. Suggested Workflow
MatchThem supports a workflow for matching or weighting multiply imputed datasets, assessing balance, estimating effects, and pooling estimates. The workflow includes repeating matching or weighting with alternative methods when balance is inadequate.
4. Suggested Workflow
- Impute missing data to create completed datasets; MatchThem currently supports datasets generated by mice and Amelia for R.Source: §4 · p. 10
- Use matchthem() or weightthem() to match or weight the multiply imputed datasets with either the within or across approach.Source: §4 · p. 10
- Assess balance with cobalt’s bal.tab() and love.plot() on the matched or weighted output, repeating the procedure with other approaches or methods if balance is not achieved.Source: §4 · p. 10
- Use MatchThem’s with() function to estimate causal effects and standard errors in each matched or weighted dataset, using robust standard errors with weighting and most matching methods.Robust standard errors are available through integration with the survey package.Source: §4 · p. 10
- Pool effect estimates and standard errors from the datasets using Rubin’s rules with the package’s pool() function.Source: §4 · p. 10
5. Example
The example applies the suggested workflow to a question about whether baseline osteoporosis is associated with follow-up knee osteoarthritis. The dataset includes 2,585 individuals and missing values in five variables, with missingness assumed to be at random.
5. Example
- The example asks whether baseline osteoporosis is associated with increased odds of developing knee osteoarthritis during follow-up.The osteoarthritis dataset is included in MatchThem.Source: §5 · p. 11
- The dataset contains seven characteristics measured for 2,585 individuals.They include age, gender, body mass index, racial background, smoking status, baseline osteoporosis, and follow-up knee osteoarthritis.Source: §5 · p. 11
- Missing values occur in BMI, racial background, smoking status, osteoporosis, and knee osteoarthritis; the example assumes they are missing at random.Source: §5 · p. 11
5.1. Imputing the Missing Data in the Dataset
The example uses mice to impute the missing data, producing five completed datasets. MatchThem also supports datasets imputed with Amelia.
5.1. Imputing the Missing Data in the Dataset
- The example uses the mice R package to impute missing data and produces five imputed datasets in a mids object.Source: §5.1 · p. 11
- MatchThem also supports multiply imputed datasets generated with the Amelia package.Source: §5.1 · p. 11
5.2. Matching or Weighting the Imputed Datasets
MatchThem provides functions for matching and weighting multiply imputed datasets using common methods. The example specifies within matching and across weighting, with method-specific compatibility constraints for the across approach.
5.2.1. Matching the Imputed Datasets
- matchthem() supports common matching methods, but across matching is limited to nearest, full, subclassification, and optimal methods that estimate a distance score.Source: §5.2.1 · p. 11
- Matching the imputed datasets with nearest-neighbor propensity-score matching, a 5% caliper, and a 1:2 ratio produces matched datasets after five iterations.The example uses all covariates as theoretical confounders; the resulting mimids object stores procedure and matched-data information.Source: §5.2.1 · p. 12
5.2.2. Weighting the Imputed Datasets
- weightthem() supports IPW, generalized boosted modeling, covariate balancing propensity score, and entropy balancing in multiply imputed datasets.Source: §5.2.2 · p. 12
- The weighting example uses across IPW with logistic-regression propensity scores and targets the average treatment effect in the matched sample (ATM).Across weighting is compatible only with methods that estimate a propensity score.Source: §5.2.2 · p. 12
5.3. Assessing Balance on the Matched or Weighted Datasets
Balance diagnostics are available for both matched and weighted imputed datasets. In the example, the reported SMD summaries indicate that covariates are well balanced across imputations for both procedures.
5.3.1. Assessing Balance on the Matched Datasets
- cobalt functions bal.tab(), bal.plot(), and love.plot() can assess balance in matched imputed datasets.Source: §5.3.1 · p. 13
- The matched-dataset SMD summaries are close to zero, indicating well-balanced osteoporosis groups across imputations.The reported table gives minimum, mean, and maximum adjusted differences for each covariate; average and maximum absolute SMDs are also assessed.Source: §5.3.1 · p. 13
5.3.2. Assessing Balance on the Weighted Datasets
- The same cobalt functions can assess balance in weighted imputed datasets.Source: §5.3.2 · p. 14
- The weighted-dataset SMD summaries indicate well-balanced covariates across imputations by average SMD and average and maximum absolute SMD.Source: §5.3.2 · p. 14
5.4. Analyzing the Matched or Weighted Datasets
The matched and weighted datasets are analyzed with `with()` to estimate causal effects. For matched datasets, robust standard errors are required for matching with replacement, non-1:1 ratios, or calipers; weighted analyses automatically identify each unit’s weights.
5.4.1. Analyzing the Matched Datasets
- Use `with()` to estimate the causal effect in each matched dataset, with outcome models such as `glm()` or survey-package models.The `with()` call leaves the model's data and weights arguments, or survey model's design argument, unspecified.Source: §5.4.1 · p. 14
- For matched datasets using replacement, non-1:1 ratios, or calipers, estimate robust standard errors with `svyglm()` or `svycoxph()`.The example uses ratio and caliper matching, so the authors adopt robust standard errors.Source: §5.4.1 · pp. 14–15
5.4.2. Analyzing the Weighted Datasets
- For weighted datasets, `with()` automatically identifies each unit’s sampling or propensity-score weight for weighted analyses.The weighted datasets can be analyzed similarly to the matched datasets.Source: §5.4.2 · p. 15
5.5. Pooling the Causal Effect Estimates
The matched and weighted analyses pool their causal-effect estimates with `pool()`. In this sample, neither analysis found an association between baseline osteoporosis and knee osteoarthritis during follow-up.
5.5.1. Pooling the Causal Effect Estimates (Obtained from the Matched Datasets)
- `pool()` saves the pooled matched-dataset estimates in `matched.results`, which can be inspected with `summary()`.The displayed summary includes estimates, standard errors, statistics, degrees of freedom, p-values, and confidence limits.Source: §5.5.1 · p. 15
- The matched analysis found no association: beta = -0.16 [- 0.42 – 0.11] and odds ratio = 0.85 [0.66 - 1.11].The estimates were obtained after pooling the causal-effect estimates from the matched datasets.Source: §5.5.1 · p. 15
5.5.2. Pooling the Causal Effect Estimates (Obtained from the Weighted Datasets)
- The weighted analysis also did not show an association between osteoporosis and knee osteoarthritis development in this sample.Causal-effect estimates from the weighted datasets are pooled with `pool()`.Source: §5.5.2 · pp. 15–16
6. Conclusions
The conclusion presents a five-action framework for matching and weighting multiply imputed datasets and recommends best practices for assessing balance after those procedures.
6. Conclusions
- The paper proposes mapping matching and weighting multiply imputed datasets to five actions and assessing balance after matching or weighting.The conclusion presents this as a framework for addressing procedures that cannot be immediately applied to datasets with missing values.Source: §6 · p. 17
- Multiple imputation preserves the number of units while accounting for uncertainty in missing values.The conclusion describes multiple imputation as a popular approach for handling missing data.Source: §6 · p. 17
- Matching or weighting balances confounder distributions across exposure levels in observational studies.The conclusion identifies these as accepted methods.Source: §6 · p. 17