The DOI matches its Crossref record; 51 of the 51 references it cites were found in a registry or an index.
medflex: An R Package for Flexible Mediation Analysis using Natural Effect Models
Open accessAbstract
Mediation analysis is routinely adopted by researchers from a wide range of applied disciplines as a statistical tool to disentangle the causal pathways by which an exposure or treatment affects an outcome. The counterfactual framework provides a language for clearly defining path-specific effects of interest and has fostered a principled extension of mediation analysis beyond the context of linear models. This paper describes medflex, an R package that implements some recent developments in mediation analysis embedded within the counterfactual framework. The medflex package offers a set of ready-made functions for fitting natural effect models, a novel class of causal models which directly parameterize the path-specific effects of interest, thereby adding flexibility to existing software packages for mediation analysis, in particular with respect to hypothesis testing and parsimony. In this paper, we give a comprehensive overview of the functionalities of the medflex package.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
R: A Language and Environment for Statistical Computing
R Core Team (2025) · doi:10.32614/r.manuals · Cited by 352,181
Baron, R. M., & Kenny, D. A. (1986) · Journal of Personality and Social Psychology · doi:10.1037/0022-3514.51.6.1173 · Cited by 91,532
Longitudinal data analysis using generalized linear models
LIANG, K.-Y., & ZEGER, S. L. (1986) · Biometrika · doi:10.1093/biomet/73.1.13 · Cited by 18,550
mice: Multivariate Imputation by Chained Equations in R
Buuren, S. V., & Groothuis-Oudshoorn, K. (2011) · Journal of Statistical Software · doi:10.18637/jss.v045.i03 · Cited by 13,870
Simultaneous Inference in General Parametric Models
Hothorn, T., Bretz, F., & Westfall, P. (2008) · Biometrical Journal · doi:10.1002/bimj.200810425 · Cited by 13,847
Addressing Moderated Mediation Hypotheses: Theory, Methods, and Prescriptions
Preacher, K. J., Rucker, D. D., & Hayes, A. F. (2007) · Multivariate Behavioral Research · doi:10.1080/00273170701341316 · Cited by 9,973
Brown, R. A., Hastie, T. J., & Tibshirani, R. J. (1991) · Biometrics · doi:10.2307/2532174 · Cited by 8,176
Statistics and Causal Inference
Holland, P. W. (1986) · Journal of the American Statistical Association · doi:10.1080/01621459.1986.10478354 · Cited by 5,293 · cited 2×
“Adopting this counterfactual notation naturally leads to framing causal inference as a missing data problem (Holland 1986): for each subject i, only one counterfactual outcome, i.”
mediation:R Package for Causal Mediation Analysis
Tingley, D., Yamamoto, T., Hirose, K., Keele, L., & Imai, K. (2014) · Journal of Statistical Software · doi:10.18637/jss.v059.i05 · Cited by 4,155
A general approach to causal mediation analysis.
Imai, K., Keele, L., & Tingley, D. (2010) · Psychological Methods · doi:10.1037/a0020761 · Cited by 4,143
Statistical mediation analysis with a multicategorical independent variable
Hayes, A. F., & Preacher, K. J. (2014) · British Journal of Mathematical and Statistical Psychology · doi:10.1111/bmsp.12028 · Cited by 3,403
When moderation is mediated and mediation is moderated.
Muller, D., Judd, C. M., & Yzerbyt, V. Y. (2005) · Journal of Personality and Social Psychology · doi:10.1037/0022-3514.89.6.852 · Cited by 3,340
Process Analysis: Estimating Mediation in Treatment Evaluations
Judd, C. M., & Kenny, D. A. (1981) · Evaluation Review · doi:10.1177/0193841x8100500502 · Cited by 2,442
Causal diagrams for empirical research
PEARL, J. (1995) · Biometrika · doi:10.1093/biomet/82.4.669 · Cited by 2,355 · cited 1×
“Figure 2 depicts the causal diagram (Pearl 1995) that reflects this mediation hypothesis along with its aforementioned identification assumptions.”
Valeri, L., & VanderWeele, T. J. (2013) · Psychological Methods · doi:10.1037/a0031034 · Cited by 2,132
Identifiability and exchangeability for direct and indirect effects
Robins, J. M., & Greenland, S. (1992) · Epidemiology · doi:10.1097/00001648-199203000-00013 · Cited by 1,793
Hayes, A. F., & Preacher, K. J. (2010) · Multivariate Behavioral Research · doi:10.1080/00273171.2010.498290 · Cited by 1,160
Yes, but what’s the mechanism? (don’t expect an easy answer).
Bullock, J. G., Green, D. P., & Ha, S. E. (2010) · Journal of Personality and Social Psychology · doi:10.1037/a0018933 · Cited by 1,063
Pearl, J. (2022) · Probabilistic and Causal Inference · doi:10.1145/3501714.3501736 · Cited by 1,033
Identification, Inference, and Sensitivity Analysis for Causal Mediation Effects
Imai, K., & Keele, L. J. (2008) · Cited by 887
Mediation analysis with multiple mediators
VanderWeele, T., & Vansteelandt, S. (2014) · Epidemiologic Methods · doi:10.1515/em-2012-0010 · Cited by 858
Self-citationOdds Ratios for Mediation Analysis for a Dichotomous Outcome
VanderWeele, T. J., & Vansteelandt, S. (2010) · American Journal of Epidemiology · doi:10.1093/aje/kwq332 · Cited by 809
Self-citationMultiple-Imputation Inferences with Uncongenial Sources of Input
Meng, X.-L. (1994) · Statistical Science · doi:10.1214/ss/1177010269 · Cited by 756
Hicks, R., & Tingley, D. (2011) · The Stata Journal: Promoting communications on statistics and Stata · doi:10.1177/1536867x1201100407 · Cited by 739
Conceptual issues concerning mediation, interventions and composition
Vanderweele, T. J., & Vansteelandt, S. (2009) · Statistics and Its Interface · doi:10.4310/sii.2009.v2.n4.a7 · Cited by 739
Self-citationInterpretation and identification of causal mediation
Pearl, J. (2014) · Psychological Methods · doi:10.1037/a0036434 · Cited by 554 · cited 1×
“1 Pearl (2001, 2014) offers a weaker set of conditions, which does not require a common set of baseline covariates to deconfound each of the possibly confounded relations, but allows for separate adjustment sets for the exposure-mediator relation on the one hand and the exposure-outcome and…”
Mediation analysis and categorical variables: The final frontier
Iacobucci, D. (2012) · Journal of Consumer Psychology · doi:10.1016/j.jcps.2012.03.006 · Cited by 481
Identifiability of path-specific effects
Avin, C., Shpitser, I., & Pearl, J. (2005) · eScholarship (California Digital Library) · Cited by 425
Vector Generalized Additive Models
Yee, T. W., & Wild, C. J. (1996) · Journal of the Royal Statistical Society Series B: Statistical Methodology · doi:10.1111/j.2517-6161.1996.tb02095.x · Cited by 423
Effect Decomposition in the Presence of an Exposure-Induced Mediator-Outcome Confounder
VanderWeele, T. J., Vansteelandt, S., & Robins, J. M. (2014) · Epidemiology · doi:10.1097/ede.0000000000000034 · Cited by 401
Self-citationEstimation of Direct Causal Effects
Petersen, M. L., Sinisi, S. E., & van der Laan, M. J. (2006) · Epidemiology · doi:10.1097/01.ede.0000208475.99429.2d · Cited by 362
A Three-way Decomposition of a Total Effect into Direct, Indirect, and Interactive Effects
VanderWeele, T. J. (2013) · Epidemiology · doi:10.1097/ede.0b013e318281a64e · Cited by 242
Inverse odds ratio‐weighted estimation for causal mediation analysis
Tchetgen Tchetgen, E. J. (2013) · Statistics in Medicine · doi:10.1002/sim.5864 · Cited by 211
IDENTIFYING CAUSAL MECHANISMS (PRIMARILY) BASED ON INVERSE PROBABILITY WEIGHTING
Huber, M. (2013) · Journal of Applied Econometrics · doi:10.1002/jae.2341 · Cited by 192
Imputation Strategies for the Estimation of Natural Direct and Indirect Effects
Vansteelandt, S., Bekaert, M., & Lange, T. (2012) · Epidemiologic Methods · doi:10.1515/2161-962x.1014 · Cited by 174
Self-citationDaniel, R. M., De Stavola, B. L., & Cousens, S. N. (2011) · The Stata Journal: Promoting communications on statistics and Stata · doi:10.1177/1536867x1201100401 · Cited by 174
On model selection and model misspecification in causal inference.
Vansteelandt, S., Bekaert, M., & Claeskens, G. (2012) · Statistical Methods in Medical Research · doi:10.1177/0962280210387717 · Cited by 172
Self-citationGeneralized Causal Mediation Analysis
Albert, J. M., & Nelson, S. (2011) · Biometrics · doi:10.1111/j.1541-0420.2010.01547.x · Cited by 160
Mediation analysis via potential outcomes models
Albert, J. M. (2007) · Statistics in Medicine · doi:10.1002/sim.3016 · Cited by 156
The Mediation Formula: A Guide to the Assessment of Causal Pathways in Nonlinear Models
Pearl, J. (2012) · Wiley series in probability and statistics · doi:10.1002/9781119945710.ch12 · Cited by 140
van der Laan, M. J., & Petersen, M. L. (2008) · The International Journal of Biostatistics · doi:10.2202/1557-4679.1064 · Cited by 128
Natural Direct and Indirect Effects on the Exposed: Effect Decomposition under Weaker Assumptions
Vansteelandt, S., & VanderWeele, T. J. (2012) · Biometrics · doi:10.1111/j.1541-0420.2012.01777.x · Cited by 117
Self-citationDirect and Indirect Effects of Sequential TreatmentsPreprint
Didelez, V., Dawid, A. P., & Geneletti, S. (2012) · arXiv (Cornell University) · doi:10.48550/arxiv.1206.6840 · Cited by 108
Tchetgen Tchetgen, E. J., & VanderWeele, T. J. (2014) · Epidemiology · doi:10.1097/ede.0000000000000054 · Cited by 93
Alternative Graphical Causal Models and the Identification of Direct E!ects
Robins, J. M., & Richardson, T. S. (2010) · Cited by 78
Hong, G., Deutsch, J., & Hill, H. D. (2015) · Journal of Educational and Behavioral Statistics · doi:10.3102/1076998615583902 · Cited by 53
Comment on Pearl: Practical implications of theoretical results for causal mediation analysis.
Imai, K., Keele, L. J., Tingley, D. H., & Yamamoto, T. (2014) · Psychological Methods · doi:10.1037/met0000021 · Cited by 49
Smet, O. D., Loeys, T., & Buysse, A. (2012) · Journal of Family Violence · doi:10.1007/s10896-012-9437-1 · Cited by 44
Self-citationDistribution-Free Mediation Analysis for Nonlinear Models with Confounding
Albert, J. M. (2012) · Epidemiology · doi:10.1097/ede.0b013e31826c2bb9 · Cited by 32
Vansteelandt, S. (2012) · Epidemiology · doi:10.1097/ede.0b013e31826d0f6f · Cited by 25
Self-citationA Note on Formulae for Causal Mediation Analysis in an Odds Ratio Context
Tchetgen, E. T. (2014) · Epidemiologic Methods · doi:10.1515/em-2012-0005 · Cited by 19
Cited by
Mediation analysis methods used in observational research: a scoping review and recommendations
Rijnhart, J. J. M., Lamp, S. J., Valente, M. J., MacKinnon, D. P., Twisk, J. W. R., & Heymans, M. W. (2021) · BMC Medical Research Methodology · doi:10.1186/s12874-021-01426-3 · Cited by 345
Starling, A. P., Adgate, J. L., Hamman, R. F., Kechris, K., Calafat, A. M., Ye, X., & Dabelea, D. (2017) · Environmental Health Perspectives · doi:10.1289/ehp641 · Cited by 142
Flexible Mediation Analysis With Multiple Mediators
Steen, J., Loeys, T., Moerkerke, B., & Vansteelandt, S. (2017) · American Journal of Epidemiology · doi:10.1093/aje/kwx051 · Cited by 123
Self-citationHeerspink, H. J. L., Apperloo, E., Davies, M., Dicker, D., Kandler, K., Rosenstock, J., Sørrig, R., Lawson, J., Zeuthen, N., & Cherney, D. (2023) · Diabetes Care · doi:10.2337/dc22-1889 · Cited by 98
“The mediation analysis was performed using the medflex package in R (23).”
MethodSomvanshi, P. R., Mellon, S. H., Yehuda, R., Flory, J. D., Makotkine, I., Bierer, L., Marmar, C., Jett, M., & Doyle, F. J. (2020) · American Journal of Physiology-Endocrinology and Metabolism · doi:10.1152/ajpendo.00398.2019 · Cited by 55
Metadata
- Authors
- Steen, J., Loeys, T., Moerkerke, B., & Vansteelandt, S.
- Venue
- Journal of Statistical Software
- Publisher
- Foundation for Open Access Statistic
- Published
- 2017
- Volume
- 76
- Issue
- 11
- ISSN
- 1548-7660 (ISSN-L)
- OpenAlex
- W2591836500
- Cited by
- 278
- References
- 51
- FWCI
- 11.87
- Type
- journal article
- Language
- en
- Open access
- diamond
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.