Thank you Edward.
That would not be a real problem, I can just write: slowstandsw1 ~~
(0.11)*slowstandsw1
But I was asking because I've received this message from lavaan when
using a similar specification:
Warning message:
In lav_object_post_check(object) :
lavaan WARNING: some estimated ov variances are negative
This is my model:
model <- '
# latent variable definitions
#reflective
MOB =~ 1.0*slowstandsw1
VIS =~ 1.0*visimpw1
HEAR =~ 1.0*hearimpw1
VIT =~ lossweiw1 + lossappw1
COG =~ failyearw1 + failmonthw1 + faildmonthw1 + faildweekw1
EMO =~ emptyw1 + nohappw1 + nohopew1
HOSP =~ 1.0*hosp3y
INST =~ 1.0*depaivdw2
BAS =~ 1.0*depabvdw2
#fix error variance
slowstandsw1 ~~ .11*slowstandsw1
visimpw1 ~~ 0.14*visimpw1
hearimpw1 ~~ 0.14*hearimpw1 #copio la de visión
hosp3y ~~ 0.01*hosp3y
depaivdw2 ~~ 0.085*depaivdw2
depabvdw2 ~~ 0.01*depabvdw2 #100% reliability en
literatura pero le meto algo de error
# regressions
BAS ~ MOB + VIS + HEAR + VIT + COG + EMO + HI8_w2 + woman
+ primarios + masqueprim + charlsonw1
INST ~ MOB + VIS + HEAR + VIT + COG + EMO + HI8_w2 +
woman + primarios + masqueprim + charlsonw1
HOSP ~ MOB + VIS + HEAR + VIT + COG + EMO + HI8_w2 +
woman + primarios + masqueprim + charlsonw1
MOB ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
VIS ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
HEAR ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
VIT ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
COG ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
EMO ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
'
fit <- sem(model, data=icopetescsemic,
std.lv=TRUE,
ordered=c("slowstandsw1","visimpw1","hearimpw1","lossweiw1","lossappw1",
"failyearw1","failmonthw1","faildmonthw1","faildweekw1","nohappw1","emptyw1","nohopew1","hosp3y",
"depabvdw2","depaivdw2"))
And these are the variances:
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.slowstandsw1 0.000 0.000 0.000
.visimpw1 0.000 0.000 0.000
.hearimpw1 0.000 0.000 0.000
.hosp3y -0.035 -0.035 -0.029
.depaivdw2 -0.050 -0.050 -0.037
.depabvdw2 -0.131 -0.131 -0.109
.lossweiw1 0.433 0.433 0.415
.lossappw1 0.478 0.478 0.459
.failyearw1 0.585 0.585 0.573
.failmonthw1 0.529 0.529 0.517
.faildmonthw1 0.551 0.551 0.539
.faildweekw1 0.562 0.562 0.550
.emptyw1 0.246 0.246 0.225
.nohappw1 0.402 0.402 0.375
.nohopew1 0.281 0.281 0.259
.MOB 1.000 0.959 0.959
.VIS 1.000 0.842 0.842
.HEAR 1.000 0.944 0.944
.VIT 1.000 0.927 0.927
.COG 1.000 0.953 0.953
.EMO 1.000 0.892 0.892
.HOSP 1.000 0.796 0.796
.INST 1.000 0.724 0.724
.BAS 1.000 0.754 0.754
The culprits are the single indicators hosp3y, depaidvdw2, depabvdw2
of HOSP, INST and BAS, respectively.
The interesting thing is that, when I run the same model without using
these single indicators, but the item themselves:
model <- '
# latent variable definitions
#reflective
MOB =~ 1.0*slowstandsw1
VIS =~ 1.0*visimpw1
HEAR =~ 1.0*hearimpw1
VIT =~ lossweiw1 + lossappw1
COG =~ failyearw1 + failmonthw1 + faildmonthw1 + faildweekw1
EMO =~ emptyw1 + nohappw1 + nohopew1
#HOSP =~ 1.0*hosp3y
#INST =~ 1.0*depaivdw2
#BAS =~ 1.0*depabvdw2
#fix error variance
slowstandsw1 ~~ .11*slowstandsw1
visimpw1 ~~ 0.14*visimpw1
hearimpw1 ~~ 0.14*hearimpw1 #copio la de visión
#hosp3y ~~ 0.01*hosp3y
#depaivdw2 ~~ 0.085*depaivdw2
#depabvdw2 ~~ 0.01*depabvdw2 #100% reliability en
literatura pero le meto algo de error
# regressions
depabvdw2 ~ MOB + VIS + HEAR + VIT + COG + EMO + HI8_w2 +
woman + primarios + masqueprim + charlsonw1
depaivdw2 ~ MOB + VIS + HEAR + VIT + COG + EMO + HI8_w2 +
woman + primarios + masqueprim + charlsonw1
hosp3y ~ MOB + VIS + HEAR + VIT + COG + EMO + HI8_w2 +
woman + primarios + masqueprim + charlsonw1
MOB ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
VIS ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
HEAR ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
VIT ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
COG ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
EMO ~ HI8_w2 + woman + primarios + masqueprim + charlsonw1
'
fit <- sem(model, data=icopetescsemic,
std.lv=TRUE,
ordered=c("slowstandsw1","visimpw1","hearimpw1","lossweiw1","lossappw1",
"failyearw1","failmonthw1","faildmonthw1","faildweekw1","nohappw1","emptyw1","nohopew1","hosp3y",
"depabvdw2","depaivdw2"))
There is no problem with the variances:
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.slowstandsw1 0.000 0.000 0.000
.visimpw1 0.000 0.000 0.000
.hearimpw1 0.000 0.000 0.000
.lossweiw1 0.433 0.433 0.415
.lossappw1 0.478 0.478 0.459
.failyearw1 0.585 0.585 0.573
.failmonthw1 0.529 0.529 0.517
.faildmonthw1 0.551 0.551 0.539
.faildweekw1 0.562 0.562 0.550
.emptyw1 0.246 0.246 0.225
.nohappw1 0.402 0.402 0.375
.nohopew1 0.281 0.281 0.259
.depabvdw2 0.869 0.869 0.727
.depaivdw2 0.950 0.950 0.714
.hosp3y 0.965 0.965 0.791
.MOB 1.000 0.959 0.959
.VIS 1.000 0.842 0.842
.HEAR 1.000 0.944 0.944
.VIT 1.000 0.927 0.927
.COG 1.000 0.953 0.953
.EMO 1.000 0.892 0.892
Is there a reason (and more importantly, a solution) for that?
Best regards,
Ángel
El jue, 13 oct 2022 a las 13:04, Edward Rigdon
(<
edward...@gmail.com>) escribió:
> To view this discussion on the web visit
https://groups.google.com/d/msgid/lavaan/CAHxMgefUfEMNVNoKeYPvrSin9e3Thvbabu3VrBOpJmjraK5KZw%40mail.gmail.com.