You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

路径分析RMSEA=0.00的含义及控制/中介变量添加方法问询

问题1:RMSEA=0.00、置信区间=0.00且p值为NA的含义

从输出结果可以看到,用户模型的自由度(Degrees of freedom)为0,这说明当前模型是饱和模型:模型中估计的参数数量等于数据中变量的协方差总数,模型完全拟合观测数据,没有残差可以用来评估拟合优度。

这种情况下:

  • RMSEA(均方根误差近似值)显示为0.00,因为饱和模型的近似误差为0
  • 由于自由度为0,无法计算RMSEA的p值,因此显示为NA
  • 同时CFI、TLI为1.000,SRMR为0.000,都是饱和模型的典型特征

饱和模型没有拟合优度的检验意义,因为它必然完美拟合数据,若要评估模型合理性,需要设定带有约束的非饱和模型(比如加入中介路径、限制某些参数为0等)。

问题2:在路径分析中加入控制变量与中介变量的方法

加入控制变量

控制变量(如数据中的Gender、Education、Income等人口统计学变量)只需添加到回归公式的自变量列表中,用+分隔即可。

示例代码

如果所有因变量的控制变量一致,可简化写法:

# 加入Gender、Education作为控制变量
model_with_controls <-"
ML_NC+ML_NS+Preventive ~ TPE+covidconcern+MisinfoEx+CorrectAction + Gender + Education
"
fit_controls <- sem(model_with_controls, data = dataset2)
summary(fit_controls, fit.measures=TRUE, standardized=T, rsquare=T)

如果不同因变量需要不同控制变量,可分开写每个回归式:

model_with_controls <-"
ML_NC ~ TPE+covidconcern+MisinfoEx+CorrectAction + Gender + Education
ML_NS ~ TPE+covidconcern+MisinfoEx+CorrectAction + Gender
Preventive ~ TPE+covidconcern+MisinfoEx+CorrectAction + Income
"

加入中介变量

假设要验证某个中介路径(比如TPE通过covidconcern影响ML_NC),需要明确写出直接效应和中介路径的回归关系。

示例代码(部分中介模型)

model_with_mediator <-"
# 直接效应:自变量对因变量的直接影响
ML_NC ~ TPE + MisinfoEx + CorrectAction + Gender  # 控制变量可选
ML_NS ~ TPE + MisinfoEx + CorrectAction + Gender
Preventive ~ TPE + MisinfoEx + CorrectAction + Gender

# 中介路径:自变量→中介变量,中介变量→因变量
covidconcern ~ TPE + MisinfoEx + CorrectAction + Gender
ML_NC ~ covidconcern
ML_NS ~ covidconcern
Preventive ~ covidconcern
"
# 用bootstrap检验中介效应显著性
fit_mediator <- sem(model_with_mediator, data = dataset2, bootstrap = 1000)
summary(fit_mediator, fit.measures=TRUE, standardized=T, rsquare=T)
# 查看中介效应的bootstrap置信区间
parameterEstimates(fit_mediator, boot.ci.type = "bca.simple")

中介模型属于非饱和模型,会有大于0的自由度,此时RMSEA等拟合指标就可以正常计算了。

内容的提问来源于stack exchange,提问作者Haehae

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 03:25:17