首页 > 解决方案 > 从抑郁/焦虑问卷中创建 Lavaan 的幸福感潜在变量

问题描述

我正在构建一个包含 4 个潜在变量的结构方程模型:身体生活方式、社会生活方式、创伤评分和 DV(幸福感)。

我们对幸福感进行了 7 个问题的调查,但我认为将幸福感、抑郁症和焦虑症的三项调查剔除以使其成为潜在因变量会更合理(测量误差更小)。我收到警告说,仅使用调查的比例分数时协方差矩阵不是正定的,因此我决定实际合并调查本身的问题。但是,当我这样做然后查看修改指数时,我收到一个输出表明残差当前不相关,当我认为这是任何潜在变量的默认值时,这就是为什么我想知道我是否指定正确的幸福潜在变量(是否只是添加最终将包含该潜在变量的所有问题)。

下面是整个模型。潜在变量“幸福”目前只有来自 phq 9,抑郁调查的问题;和一般焦虑调查(但也将添加到幸福调查中)。我在下面添加了修改索引的输出。

我在这里包含了一些数据:https ://drive.google.com/file/d/1AX50DFNik30Qsyiyp6XnPMETNfVXK83r/view?usp=sharing

非常感谢!

fit.latent_wb <- '
  #factor loadings; measurement model portion
  pl =~ exercisescore + mindfulnessscore + promistscore
  sl =~ family_support + friendshipcount + friendshipnet +
        sense_of_community + sesscore + ethnicity
  trauma =~ neglectscore + abusescore + exposure + family_support + age
   wb =~ phq9_1 + phq9_2 + phq9_3 + phq9_4 + phq9_5 + phq9_6 +
         phq9_7 + phq9_8 + phq9_9 + gad7_1 + gad7_2 + gad7_3 + gad7_4 +
         gad7_5+ gad7_6+ gad7_7

  #regressions: structural model
  wb ~ age + gender + ethnicity + sesscore + resiliencescore + 
       pl + emotionalsupportscore + trauma
  resiliencescore ~ age + sesscore + emotionalsupportscore + sl
  emotionalsupportscore ~ sl + gender

friendshipnet~~age
exercisescore~~sense_of_community
'
fit.latent_wb <- sem(fit.latent_wb, data = total, meanstructure = TRUE, std.lv = TRUE)
summary(fit.latent_wb, fit.measures = TRUE,standardized = TRUE, rsquare = TRUE, estimates = FALSE)

Mod 索引的输出:

在此处输入图像描述

标签: rr-lavaanstructural-equation-model

解决方案


推荐阅读