Skip to contents

drmSEM adds a structural-equation-modelling layer on top of the drmTMB fitting engine. Each endogenous node is one drmTMB fit; drmSEM extracts the component-labelled graph, validates it as a DAG, and provides path tables, d-separation tests, and simulation-based direct, indirect, and total effects.

Details

Causal paths are component-labelled: a predictor may target the expected response (mu), residual scale (sigma), shape (nu), zero-inflation (zi), hurdle probability (hu), random-effect scale (sd(group)), or bivariate residual correlation (rho12) of a node. Indirect effects can flow through a mediator's mean (mean-mediated) or its distribution (distribution-mediated), and are always computed by simulation rather than by coefficient products.

Engine vs layer

drmTMB is the model-fitting engine; drmSEM is the graph, SEM, d-separation, path, and effect-decomposition layer. drmSEM never fits its own likelihoods.

Methodological background

drmSEM builds on a number of distinct literatures, all of which are cited at the point of use in the individual function help pages and the package vignettes. The canonical entry points are:

  • Piecewise SEM and local-likelihood d-separation: Shipley B (2000). “A New Inferential Test for Path Models Based on Directed Acyclic Graphs.” Structural Equation Modeling, 7(2), 206–218. doi:10.1207/S15328007SEM0702_4 . , Shipley B (2009). “Confirmatory Path Analysis in a Generalized Multilevel Context.” Ecology, 90(2), 363–368. doi:10.1890/08-1034.1 . , Lefcheck JS (2016). “piecewiseSEM: Piecewise Structural Equation Modelling in R for Ecology, Evolution, and Systematics.” Methods in Ecology and Evolution, 7(5), 573–579. doi:10.1111/2041-210X.12512 . .

  • d-separation foundation: Pearl J (2009). Causality: Models, Reasoning, and Inference, 2nd edition. Cambridge University Press, Cambridge. .

  • Counterfactual mediation (direct, indirect, natural, interventional): Pearl J (2001). “Direct and Indirect Effects.” In Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence (UAI), 411–420. , Imai K, Keele L, Yamamoto T (2010). “Identification, Inference and Sensitivity Analysis for Causal Mediation Effects.” Statistical Science, 25(1), 51–71. doi:10.1214/10-STS321 . , VanderWeele TJ (2015). Explanation in Causal Inference: Methods for Mediation and Interaction. Oxford University Press, New York. , VanderWeele TJ (2014). “A Unification of Mediation and Interaction: A 4-Way Decomposition.” Epidemiology, 25(5), 749–761. doi:10.1097/EDE.0000000000000121 . , Vansteelandt S, Daniel RM (2017). “Interventional Effects for Mediation Analysis with Multiple Mediators.” Epidemiology, 28(2), 258–265. doi:10.1097/EDE.0000000000000596 . .

  • Distributional regression: Rigby RA, Stasinopoulos DM (2005). “Generalized Additive Models for Location, Scale and Shape.” Journal of the Royal Statistical Society Series C: Applied Statistics, 54(3), 507–554. doi:10.1111/j.1467-9876.2005.00510.x . , Brooks ME, Kristensen K, van Benthem KJ, Magnusson A, Berg CW, Nielsen A, Skaug HJ, Maechler M, Bolker BM (2017). “glmmTMB Balances Speed and Flexibility Among Packages for Zero-Inflated Generalized Linear Mixed Models.” The R Journal, 9(2), 378–400. doi:10.32614/RJ-2017-066 . .

  • Phylogenetic comparative covariance: Felsenstein J (1985). “Phylogenies and the Comparative Method.” The American Naturalist, 125(1), 1–15. doi:10.1086/284325 . , Pagel M (1999). “Inferring the Historical Patterns of Biological Evolution.” Nature, 401(6756), 877–884. doi:10.1038/44766 . , Martins EP, Hansen TF (1997). “Phylogenies and the Comparative Method: A General Approach to Incorporating Phylogenetic Information into the Analysis of Interspecific Data.” The American Naturalist, 149(4), 646–667. doi:10.1086/286013 . , van der Bijl W (2018). “phylopath: Easy Phylogenetic Path Analysis in R.” PeerJ, 6, e4718. doi:10.7717/peerj.4718 . .

  • Model selection on Fisher's C: Shipley B (2013). “The AIC Model Selection Method Applied to Path Analytic Models Compared Using a d-Sep Test.” Ecology, 94(3), 560–564. doi:10.1890/12-0976.1 . , Schwarz G (1978). “Estimating the Dimension of a Model.” The Annals of Statistics, 6(2), 461–464. doi:10.1214/aos/1176344136 . , Burnham KP, Anderson DR (2002). Model Selection and Multimodel Inference: A Practical Information-Theoretic Approach, 2nd edition. Springer, New York. .

Within drmSEM, the any-component d-separation test, the distribution-mediated effect row, and the BIC-style CBIC information criterion are package-specific constructions built on these foundations and are flagged as such in their respective help pages and vignettes.

References

Shipley B (2000). “A New Inferential Test for Path Models Based on Directed Acyclic Graphs.” Structural Equation Modeling, 7(2), 206–218. doi:10.1207/S15328007SEM0702_4 .

Shipley B (2009). “Confirmatory Path Analysis in a Generalized Multilevel Context.” Ecology, 90(2), 363–368. doi:10.1890/08-1034.1 .

Shipley B (2013). “The AIC Model Selection Method Applied to Path Analytic Models Compared Using a d-Sep Test.” Ecology, 94(3), 560–564. doi:10.1890/12-0976.1 .

Lefcheck JS (2016). “piecewiseSEM: Piecewise Structural Equation Modelling in R for Ecology, Evolution, and Systematics.” Methods in Ecology and Evolution, 7(5), 573–579. doi:10.1111/2041-210X.12512 .

Pearl J (2001). “Direct and Indirect Effects.” In Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence (UAI), 411–420.

Pearl J (2009). Causality: Models, Reasoning, and Inference, 2nd edition. Cambridge University Press, Cambridge.

Imai K, Keele L, Yamamoto T (2010). “Identification, Inference and Sensitivity Analysis for Causal Mediation Effects.” Statistical Science, 25(1), 51–71. doi:10.1214/10-STS321 .

VanderWeele TJ (2015). Explanation in Causal Inference: Methods for Mediation and Interaction. Oxford University Press, New York.

Rigby RA, Stasinopoulos DM (2005). “Generalized Additive Models for Location, Scale and Shape.” Journal of the Royal Statistical Society Series C: Applied Statistics, 54(3), 507–554. doi:10.1111/j.1467-9876.2005.00510.x .

Brooks ME, Kristensen K, van Benthem KJ, Magnusson A, Berg CW, Nielsen A, Skaug HJ, Maechler M, Bolker BM (2017). “glmmTMB Balances Speed and Flexibility Among Packages for Zero-Inflated Generalized Linear Mixed Models.” The R Journal, 9(2), 378–400. doi:10.32614/RJ-2017-066 .

Felsenstein J (1985). “Phylogenies and the Comparative Method.” The American Naturalist, 125(1), 1–15. doi:10.1086/284325 .

van der Bijl W (2018). “phylopath: Easy Phylogenetic Path Analysis in R.” PeerJ, 6, e4718. doi:10.7717/peerj.4718 .

Author

Maintainer: Shinichi Nakagawa itchyshin@gmail.com

Authors: