分析显变量的 Heywood 问题
在您汇报结果后,收养小组重新设计了问卷,用于测量两个因子:goodstory 代表他们的线上故事帖是否有效,inperson 代表线下交流的重要程度。新数据已加载为 adoptsurvey。在本练习中,您将查找出现在某个显变量上的 Heywood 问题,而不是潜变量上的问题。
本练习是课程的一部分
使用 R 中的 lavaan 进行结构方程模型(SEM)
练习说明
- 使用
cfa()函数,对包含两个因子的adopt.model在更新后的数据adoptsurvey上进行分析。 - 在
cfa()运行后留意任何警告信息。 - 使用
summary()函数来定位哪个显变量存在问题。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Build the model
adopt.model <- 'goodstory =~ pictures + background + loveskids
inperson =~ energy + wagstail + playful'
# Analyze the model and include the data argument
adopt.fit <- cfa(___)
# Summarize the model to view the negative variances