Infrastructure for Mediation Model Fitting and Extraction

Provides S7-based infrastructure for fitting mediation models, extracting path coefficients, and performing bootstrap inference. Designed as a foundation package for the mediation analysis ecosystem, supporting 'probmed', 'RMediation', and 'medrobust' packages. Implements unified interfaces for model fitting across different engines (currently generalized linear models, with future support for mixed models and Bayesian methods), standardized extraction of mediation paths from various model types, and robust bootstrap inference methods. Mediation methods are described in MacKinnon, Lockwood and Williams (2004) , Preacher and Hayes (2008) , Tofighi and MacKinnon (2011) , and VanderWeele (2014) .


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("medfit")

0.3.2 by Davood Tofighi, 3 months ago


https://data-wise.github.io/medfit/, https://github.com/data-wise/medfit


Report a bug at https://github.com/data-wise/medfit/issues


Browse source code at https://github.com/cran/medfit


Authors: Davood Tofighi [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


GPL (>= 3) license


Imports S7, stats, methods, checkmate, generics, MASS

Suggests lavaan, sandwich, testthat, tibble


Suggested by RMediation.


See at CRAN