We introduce the R package nlpsem, a comprehensive toolkit for analyzing longitudinal processes within the structural equation modeling (SEM) framework, incorporating individual measurement occasions. This package emphasizes nonlinear longitudinal models, especially intrinsic ones, across four key scenarios: (1) univariate longitudinal processes with latent variables, optionally including covariates such as time-invariant covariates (TICs) and time-varying covariates (TVCs); (2) multivariate longitudinal analyses to explore correlations or unidirectional relationships between longitudinal variables; (3) multiple-group frameworks for comparing manifest classes in scenarios (1) and (2); and (4) mixture models for scenarios (1) and (2), accommodating latent class heterogeneity. Built on the OpenMx R package, nlpsem supports flexible model designs and uses the full information maximum likelihood method for parameter estimation. A notable feature is its algorithm for determining initial values directly from raw data, enhancing computational efficiency and convergence. Furthermore, nlpsem provides tools for goodness-of-fit tests, cluster analyses, visualization, derivation of p-values and three types of confidence intervals, as well as model selection for nested models using likelihood ratio tests and for non-nested models based on criteria such as Akaike Information Criterion and Bayesian Information Criterion. This article serves as a companion document to the nlpsem R package, providing a comprehensive guide to its modeling capabilities, estimation methods, implementation features, and application examples using synthetic intelligence growth data.
翻译:本文介绍R包nlpsem,这是一个在结构方程建模(SEM)框架内分析纵向过程的综合工具包,整合了个体测量时点。该包重点关注非线性纵向模型,尤其是内在非线性模型,涵盖四个关键场景:(1)含潜在变量的单变量纵向过程,可选纳入时间不变协变量(TICs)和时间变化协变量(TVCs)等协变量;(2)多变量纵向分析,用于探究纵向变量间的相关性或单向关系;(3)多组框架,用于比较场景(1)和(2)中的显性类别;(4)针对场景(1)和(2)的混合模型,适应潜在类别异质性。nlpsem基于OpenMx R包构建,支持灵活的模型设计,并采用全信息最大似然法进行参数估计。其显著特性是通过原始数据直接确定初始值的算法,提升了计算效率与收敛性。此外,nlpsem提供拟合优度检验、聚类分析、可视化、p值推导及三类置信区间的工具,以及基于似然比检验的嵌套模型选择,和基于赤池信息准则(AIC)与贝叶斯信息准则(BIC)等标准的非嵌套模型选择方法。本文作为nlpsem R包的配套文档,通过合成智能成长数据示例,全面阐述了其建模能力、估计方法、实现特性及应用案例。