0

我正在尝试在 R 中进行验证性因子分析 (CFA)。我不断收到错误消息:

警告消息:在 eval(expr, envir, enclos) 中:无法计算 Hessian 的 QR 分解。优化可能没有收敛。

我执行以下代码:

library(sem)
cov.matrix <- cov(na.omit(factor.data))

cfa.model1 <- specifyModel()
EXPERT_POWER -> Q9_c, expert1
EXPERT_POWER -> Q9_s, expert2
EXPERT_POWER -> Q9_z, expert3
EXPERT_POWER -> Q9_al, expert4
REFERENT_POWER -> Q9_e, referent1
REFERENT_POWER -> Q9_o, referent2
REFERENT_POWER -> Q9_aa, referent3
REFERENT_POWER -> Q9_ai, referent4
INFORMATIONAL_POWER -> Q9_d, informational1
INFORMATIONAL_POWER -> Q9_q, informational2
INFORMATIONAL_POWER -> Q9_x, informational3
INFORMATIONAL_POWER -> Q9_ap, informational4
LEGITIMATE_POWER_OF_DEPENDENCE -> Q9_i, ldependence1
LEGITIMATE_POWER_OF_DEPENDENCE -> Q9_p, ldependence2
LEGITIMATE_POWER_OF_DEPENDENCE -> Q9_y, ldependence3
LEGITIMATE_POWER_OF_DEPENDENCE -> Q9_an, ldependence4
PERSONAL_REWARD_POWER -> Q9_h, preward1
PERSONAL_REWARD_POWER -> Q9_n, preward2
PERSONAL_REWARD_POWER -> Q9_ac, preward3
PERSONAL_REWARD_POWER -> Q9_ag, preward4
LEGITIMATE_POWER_OF_RECIPROCITY -> Q9_g, lreciprocity1
LEGITIMATE_POWER_OF_RECIPROCITY -> Q9_l, lreciprocity2
LEGITIMATE_POWER_OF_RECIPROCITY -> Q9_af, lreciprocity3
LEGITIMATE_POWER_OF_RECIPROCITY -> Q9_aq, lreciprocity4
IMPERSONAL_COERCIVE_POWER -> Q9_f, icoercive1
IMPERSONAL_COERCIVE_POWER -> Q9_m, icoercive2
IMPERSONAL_COERCIVE_POWER -> Q9_ae, icoercive3
IMPERSONAL_COERCIVE_POWER -> Q9_am, icoercive4
LEGITIMATE_POWER_OF_EQUITY -> Q9_k, lequity1
LEGITIMATE_POWER_OF_EQUITY -> Q9_u, lequity2
LEGITIMATE_POWER_OF_EQUITY -> Q9_ad, lequity3
LEGITIMATE_POWER_OF_EQUITY -> Q9_aj, lequity4
IMPERSONAL_REWARD_POWER -> Q9_a, ireward1
IMPERSONAL_REWARD_POWER -> Q9_v, ireward2
IMPERSONAL_REWARD_POWER -> Q9_ak, ireward3
IMPERSONAL_REWARD_POWER -> Q9_ao, ireward4
PERSONAL_COERCIVE_POWER -> Q9_j, pcoercive1
PERSONAL_COERCIVE_POWER -> Q9_r, pcoercive2
PERSONAL_COERCIVE_POWER -> Q9_w, pcoercive3
PERSONAL_COERCIVE_POWER -> Q9_ar, pcoercive4
LEGITIMATE_POWER_OF_POSITION -> Q9_b, lposition1
LEGITIMATE_POWER_OF_POSITION -> Q9_t, lposition2
LEGITIMATE_POWER_OF_POSITION -> Q9_ab, lposition3
LEGITIMATE_POWER_OF_POSITION -> Q9_ah, lposition4
EXPERT_POWER <-> EXPERT_POWER, NA, 1
REFERENT_POWER <-> REFERENT_POWER, NA, 1
INFORMATIONAL_POWER <-> INFORMATIONAL_POWER, NA, 1
LEGITIMATE_POWER_OF_DEPENDENCE <-> LEGITIMATE_POWER_OF_DEPENDENCE, NA, 1
PERSONAL_REWARD_POWER <-> PERSONAL_REWARD_POWER, NA, 1
LEGITIMATE_POWER_OF_RECIPROCITY <-> LEGITIMATE_POWER_OF_RECIPROCITY, NA, 1
IMPERSONAL_COERCIVE_POWER <-> IMPERSONAL_COERCIVE_POWER, NA, 1
LEGITIMATE_POWER_OF_EQUITY <-> LEGITIMATE_POWER_OF_EQUITY, NA, 1
IMPERSONAL_REWARD_POWER <-> IMPERSONAL_REWARD_POWER, NA, 1
PERSONAL_COERCIVE_POWER <-> PERSONAL_COERCIVE_POWER, NA, 1
LEGITIMATE_POWER_OF_POSITION <-> LEGITIMATE_POWER_OF_POSITION, NA, 1
Q9_c <-> Q9_c, error1
Q9_s <-> Q9_s, error2
Q9_z <-> Q9_z, error3
Q9_al <-> Q9_al, error4
Q9_e <-> Q9_e, error5
Q9_o <-> Q9_o, error6
Q9_aa <-> Q9_aa, error7
Q9_ai <-> Q9_ai, error8
Q9_d <-> Q9_d, error8
Q9_q <-> Q9_q, error10
Q9_x <-> Q9_x, error11
Q9_ap <-> Q9_ap, error12
Q9_i <-> Q9_i, error13
Q9_p <-> Q9_p, error14
Q9_y <-> Q9_y, error15
Q9_an <-> Q9_an, error16
Q9_h <-> Q9_h, error17
Q9_n <-> Q9_n, error18
Q9_ac <-> Q9_ac, error19
Q9_ag <-> Q9_ag, error20
Q9_g <-> Q9_g, error21
Q9_l <-> Q9_l, error22
Q9_af <-> Q9_af, error23
Q9_aq <-> Q9_aq, error24
Q9_f <-> Q9_f, error25
Q9_m <-> Q9_m, error26
Q9_ae <-> Q9_ae, error27
Q9_am <-> Q9_am, error28
Q9_k <-> Q9_k, error29
Q9_u <-> Q9_u, error30
Q9_ad <-> Q9_ad, error31
Q9_aj <-> Q9_aj, error32
Q9_a <-> Q9_a, error33
Q9_v <-> Q9_v, error34
Q9_ak <-> Q9_ak, error35
Q9_ao <-> Q9_ao, error36
Q9_j <-> Q9_j, error37
Q9_r <-> Q9_r, error38
Q9_w <-> Q9_w, error39
Q9_ar <-> Q9_ar, error40
Q9_b <-> Q9_b, error41
Q9_t <-> Q9_t, error42
Q9_ab <-> Q9_ab, error43
Q9_ah <-> Q9_ah, error44
EXPERT_POWER <-> REFERENT_POWER, cov1
EXPERT_POWER <-> INFORMATIONAL_POWER, cov2
EXPERT_POWER <-> LEGITIMATE_POWER_OF_DEPENDENCE, cov3
EXPERT_POWER <-> PERSONAL_REWARD_POWER, cov4
EXPERT_POWER <-> LEGITIMATE_POWER_OF_RECIPROCITY, cov5
EXPERT_POWER <-> IMPERSONAL_COERCIVE_POWER, cov6
EXPERT_POWER <-> LEGITIMATE_POWER_OF_EQUITY, cov7
EXPERT_POWER <-> IMPERSONAL_REWARD_POWER, cov8
EXPERT_POWER <-> PERSONAL_COERCIVE_POWER, cov9
EXPERT_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov10
REFERENT_POWER <-> INFORMATIONAL_POWER, cov11
REFERENT_POWER <-> LEGITIMATE_POWER_OF_DEPENDENCE, cov12
REFERENT_POWER <-> PERSONAL_REWARD_POWER, cov13
REFERENT_POWER <-> LEGITIMATE_POWER_OF_RECIPROCITY, cov14
REFERENT_POWER <-> IMPERSONAL_COERCIVE_POWER, cov15
REFERENT_POWER <-> LEGITIMATE_POWER_OF_EQUITY, cov16
REFERENT_POWER <-> IMPERSONAL_REWARD_POWER, cov17
REFERENT_POWER <-> PERSONAL_COERCIVE_POWER, cov18
REFERENT_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov19
INFORMATIONAL_POWER <-> LEGITIMATE_POWER_OF_DEPENDENCE, cov20
INFORMATIONAL_POWER <-> PERSONAL_REWARD_POWER, cov21
INFORMATIONAL_POWER <-> LEGITIMATE_POWER_OF_RECIPROCITY, cov22
INFORMATIONAL_POWER <-> IMPERSONAL_COERCIVE_POWER, cov23
INFORMATIONAL_POWER <-> LEGITIMATE_POWER_OF_EQUITY, cov24
INFORMATIONAL_POWER <-> IMPERSONAL_REWARD_POWER, cov25
INFORMATIONAL_POWER <-> PERSONAL_COERCIVE_POWER, cov26
INFORMATIONAL_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov27
LEGITIMATE_POWER_OF_DEPENDENCE <-> PERSONAL_REWARD_POWER, cov28
LEGITIMATE_POWER_OF_DEPENDENCE <-> LEGITIMATE_POWER_OF_RECIPROCITY, cov29
LEGITIMATE_POWER_OF_DEPENDENCE <-> IMPERSONAL_COERCIVE_POWER, cov30
LEGITIMATE_POWER_OF_DEPENDENCE <-> LEGITIMATE_POWER_OF_EQUITY, cov31
LEGITIMATE_POWER_OF_DEPENDENCE <-> IMPERSONAL_REWARD_POWER, cov32
LEGITIMATE_POWER_OF_DEPENDENCE <-> PERSONAL_COERCIVE_POWER, cov33
LEGITIMATE_POWER_OF_DEPENDENCE <-> LEGITIMATE_POWER_OF_POSITION, cov34
PERSONAL_REWARD_POWER <-> LEGITIMATE_POWER_OF_RECIPROCITY, cov35
PERSONAL_REWARD_POWER <-> IMPERSONAL_COERCIVE_POWER, cov36
PERSONAL_REWARD_POWER <-> LEGITIMATE_POWER_OF_EQUITY, cov37
PERSONAL_REWARD_POWER <-> IMPERSONAL_REWARD_POWER, cov38
PERSONAL_REWARD_POWER <-> PERSONAL_COERCIVE_POWER, cov39
PERSONAL_REWARD_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov40
LEGITIMATE_POWER_OF_RECIPROCITY <-> IMPERSONAL_COERCIVE_POWER, cov41
LEGITIMATE_POWER_OF_RECIPROCITY <-> LEGITIMATE_POWER_OF_EQUITY, cov42
LEGITIMATE_POWER_OF_RECIPROCITY <-> IMPERSONAL_REWARD_POWER, cov43
LEGITIMATE_POWER_OF_RECIPROCITY <-> PERSONAL_COERCIVE_POWER, cov44
LEGITIMATE_POWER_OF_RECIPROCITY <-> LEGITIMATE_POWER_OF_POSITION, cov45
IMPERSONAL_COERCIVE_POWER <-> LEGITIMATE_POWER_OF_EQUITY, cov46
IMPERSONAL_COERCIVE_POWER <-> IMPERSONAL_REWARD_POWER, cov47
IMPERSONAL_COERCIVE_POWER <-> PERSONAL_COERCIVE_POWER, cov48
IMPERSONAL_COERCIVE_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov49
LEGITIMATE_POWER_OF_EQUITY <-> IMPERSONAL_REWARD_POWER, cov50
LEGITIMATE_POWER_OF_EQUITY <-> PERSONAL_COERCIVE_POWER, cov51
LEGITIMATE_POWER_OF_EQUITY <-> LEGITIMATE_POWER_OF_POSITION, cov52
IMPERSONAL_REWARD_POWER <-> PERSONAL_COERCIVE_POWER, cov53
IMPERSONAL_REWARD_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov54
PERSONAL_COERCIVE_POWER <-> LEGITIMATE_POWER_OF_POSITION, cov55


cfa1 <- sem(cfa.model1, cov.matrix, nrow(factor.data))
summary(cfa1,fit.indices=c("RMSEA", "NNFI", "CFI"))

当我考虑模型中较少的潜在变量时,它的计算没有任何问题。此外,当我删除指定模型()命令中的最后 55 行代码时,将执行计算。

由于我观察到计算的持续时间相对较长,并且在执行此操作时内存使用率很高,因此我怀疑 R 由于系统内存(2GB)太少而无法执行计算。这是可能的还是我没有注意到问题的其他原因?

4

0 回答 0