The piecewiseSEM R package provides a user-friendly and tractable implementation of structural equation modeling (SEM) for ecological and evolutionary research. It allows for the analysis of complex, multivariate relationships among variables, incorporating both hierarchical and phylogenetic data. The package builds on existing R syntax for generalized linear, least-square, and mixed effects models, enabling the use of a wide range of distributions and sampling designs. It also supports the incorporation of phylogenetic contrasts to address potential confounding effects of shared evolutionary history.
The paper presents two worked examples. The first example uses data from Byrnes et al. (2011) to explore the effects of storm frequency on kelp forest food web structure. The second example uses data from Duffy & Macdonald (2010) to examine the drivers of ecological success in sponge-dwelling shrimp. Both examples demonstrate how piecewise SEM can provide more accurate inferences than traditional SEM by accounting for non-independence of data points and incorporating random variation or phylogenetic contrasts.
The package includes functions for calculating AIC scores, returning parameter estimates, plotting partial correlations, and generating predictions. It also allows for the extension of directed separation tests to include interactions. The implementation of piecewise SEM is limited by the correct specification and evaluation of the basis set, which can be challenging for complex models. However, the package provides a fully-documented and open-source solution to facilitate the calculation of piecewise structural equation models.
The paper highlights the importance of considering the way data were collected when interpreting results, especially within the limits of available tools. It also discusses the limitations of piecewise SEM, including its inability to disentangle cyclic relationships or reciprocal relationships in the same model, and the lack of formal integration of latent variables. Despite these limitations, piecewise SEM represents a significant advancement in addressing the assumptions of real-world data and facilitates the testing of complex, multivariate hypotheses in evolutionary ecology.The piecewiseSEM R package provides a user-friendly and tractable implementation of structural equation modeling (SEM) for ecological and evolutionary research. It allows for the analysis of complex, multivariate relationships among variables, incorporating both hierarchical and phylogenetic data. The package builds on existing R syntax for generalized linear, least-square, and mixed effects models, enabling the use of a wide range of distributions and sampling designs. It also supports the incorporation of phylogenetic contrasts to address potential confounding effects of shared evolutionary history.
The paper presents two worked examples. The first example uses data from Byrnes et al. (2011) to explore the effects of storm frequency on kelp forest food web structure. The second example uses data from Duffy & Macdonald (2010) to examine the drivers of ecological success in sponge-dwelling shrimp. Both examples demonstrate how piecewise SEM can provide more accurate inferences than traditional SEM by accounting for non-independence of data points and incorporating random variation or phylogenetic contrasts.
The package includes functions for calculating AIC scores, returning parameter estimates, plotting partial correlations, and generating predictions. It also allows for the extension of directed separation tests to include interactions. The implementation of piecewise SEM is limited by the correct specification and evaluation of the basis set, which can be challenging for complex models. However, the package provides a fully-documented and open-source solution to facilitate the calculation of piecewise structural equation models.
The paper highlights the importance of considering the way data were collected when interpreting results, especially within the limits of available tools. It also discusses the limitations of piecewise SEM, including its inability to disentangle cyclic relationships or reciprocal relationships in the same model, and the lack of formal integration of latent variables. Despite these limitations, piecewise SEM represents a significant advancement in addressing the assumptions of real-world data and facilitates the testing of complex, multivariate hypotheses in evolutionary ecology.