结构方程模型已经成为当前生态数据分析的主要方法之一。与其他多变量统计方法不同,结构方程模型的建模过程由理论假设驱动,且可以同时量化多个变量间的直接和间接因果关系。然而,由于结构方程模型引入国内生态学领域的时间相对较短,研究者经常在实际应用中遇到各种问题,各种使用错误也屡见不鲜。对此,本文系统阐述了结构方程模型的建模原理、建模流程、模型评价、模型修正等方面内容,并且结合具体研究案例介绍了结构方程模型分析的两个主流R包—lavaan和piecewiseSEM。其中,lavaan可以分析纳入了潜变量的结构方程模型,piecewiseSEM则可以解决各观测数据不独立以及响应变量残差不满足多元正态分布等问题。本文将有助于研究者准确理解结构方程模型并能扩大其在生态学中的应用。
Structural equation modeling (SEM) is a major approach for analyzing ecological data. Differing from other multivariate statistical methods, SEM is mainly driven by assumptions and could quantify both direct and indirect causal relationships among multi-variables. Since the introduction of SEM into the field of ecology in China is relatively short, scientists encounter many problems when using SEM, with various mistakes. Therefore, we elaborated principles, processes, evaluation and modification of SEM in this review. With a case study, we introduced the usage of two major R packages for SEM, i.e. lavaan and piecewiseSEM. Concretely, lavaancan perform SEM with latent variables, while piecewiseSEM can incorporate nonindependent observations, and handle response variables with residuals not satisfying multivariate normal distribution. This review can help researchers understand and use SEM correctly and accurately, and promote the usage of SEM in ecology.