Thank you for your interest, Ed.
This is the complete model (primarios=primary; masqueprim=more than primary):
modelfus3 <- '
# latent variable definitions
# reflective
CHARL =~ 1.0*charlsonw1
AGE =~ 1.0*HI8_w2
# Latent variable variances
CHARL ~~ CHARL
AGE ~~ AGE
#fix error variance: (1-reliability)*variance
charlsonw1 ~~ 0.09*0.8285176*charlsonw1
HI8_w2 ~~ 0.01*0.262604*HI8_w2
# regressions
depabvdw2 ~ AGE + CHARL + woman + primarios + masqueprim
depaivdw2 ~ AGE + CHARL + woman + primarios + masqueprim
hosp3y ~ AGE + CHARL + woman + primarios + masqueprim
# covariances
AGE ~~ CHARL + woman + primarios + masqueprim
CHARL ~~ woman + primarios + masqueprim
woman ~~ primarios + masqueprim
primarios ~~ masqueprim
# intercepts
charlsonw1 ~ 1
HI8_w2 ~ 1
# thresholds
depabvdw2 | t1
depaivdw2 | t1
hosp3y | t1
woman | t1
primarios| t1
masqueprim | t1
'
fitfus3 <- sem(modelfus3, data=hoy, ordered=c("depabvdw2","depaivdw2","hosp3y"))
I copy the parameters that are different between this model and the
one without primarios ~~ masqueprim:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
WITH primarios~~masqueprim
depabvdw2 ~
AGE 3.722 9.971 0.373 0.709 1.893 0.583
CHARL 0.130 0.493 0.265 0.791 0.113 0.035
woman 0.580 1.383 0.419 0.675 0.580 0.178
primarios 2.048 6.209 0.330 0.741 2.048 0.631
masqueprim 2.240 7.062 0.317 0.751 2.240 0.690
WITHOUT
depabvdw2 ~
AGE 0.922 0.297 3.109 0.002 0.469 0.430
CHARL 0.219 0.131 1.673 0.094 0.190 0.174
woman 0.208 0.170 1.218 0.223 0.208 0.190
primarios 0.312 0.182 1.713 0.087 0.312 0.286
masqueprim 0.218 0.234 0.932 0.351 0.218 0.200
WITH
depaivdw2 ~
AGE 2.992 6.240 0.480 0.632 1.522 0.706
CHARL -0.005 0.319 -0.017 0.987 -0.005 -0.002
woman 0.297 0.860 0.345 0.730 0.297 0.138
primarios 1.236 3.900 0.317 0.751 1.236 0.574
masqueprim 1.423 4.414 0.322 0.747 1.423 0.661
WITHOUT
depaivdw2 ~
AGE 1.270 0.214 5.938 0.000 0.646 0.627
CHARL 0.053 0.117 0.455 0.649 0.046 0.045
woman 0.071 0.127 0.559 0.576 0.071 0.069
primarios 0.141 0.165 0.853 0.394 0.141 0.136
masqueprim 0.194 0.170 1.142 0.253 0.194 0.189
WITH
hosp3y ~
AGE -2.141 11.641 -0.184 0.854 -1.089 -0.343
CHARL 0.137 0.537 0.256 0.798 0.119 0.037
woman -0.500 1.581 -0.316 0.752 -0.500 -0.158
primarios -2.065 7.326 -0.282 0.778 -2.065 -0.651
masqueprim -2.131 8.219 -0.259 0.795 -2.131 -0.672
WITHOUT
hosp3y ~
AGE 0.622 0.354 1.759 0.079 0.317 0.291
CHARL 0.057 0.146 0.387 0.699 0.049 0.045
woman -0.126 0.146 -0.863 0.388 -0.126 -0.116
primarios -0.400 0.287 -1.395 0.163 -0.400 -0.367
masqueprim -0.106 0.220 -0.484 0.628 -0.106 -0.098
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
WITH
primarios ~~
masqueprim -0.602 0.248 -2.434 0.015 -0.602 -0.602
.depabvdw2 ~~
.depaivdw2 0.201 1.585 0.127 0.899 0.201 0.032
.hosp3y 0.773 2.867 0.270 0.787 0.773 0.083
.depaivdw2 ~~
.hosp3y 0.780 1.786 0.437 0.662 0.780 0.129
WITHOUT
depabvdw2 ~~
.depaivdw2 0.630 0.103 6.135 0.000 0.630 0.761
.hosp3y 0.101 0.185 0.548 0.583 0.101 0.117
.depaivdw2 ~~
.hosp3y 0.358 0.119 3.002 0.003 0.358 0.459
Variances:
WITH
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.depabvdw2 9.589 9.589 0.909
.depaivdw2 4.063 4.063 0.875
.hosp3y 9.035 9.035 0.899
WITHOUT
.depabvdw2 0.916 0.916 0.771
.depaivdw2 0.749 0.749 0.705
.hosp3y 0.814 0.814 0.685
R-Square:
WITH
Estimate
depabvdw2 0.091
depaivdw2 0.125
hosp3y 0.101
WITHOUT
depabvdw2 0.229
depaivdw2 0.295
hosp3y 0.315
Massive differences. The results WITHOUT are what one would expect:
age is associated with the outcomes and some of the outcomes are
associated.
Ángel
El sáb, 12 nov 2022 a las 14:00, Edward Rigdon
(<
edward...@gmail.com>) escribió:
> To view this discussion on the web visit
https://groups.google.com/d/msgid/lavaan/CAHxMgefb5iZsZogrAZN%2B9vq%3DiCWeOq1wY2FjVfS5efHELJTdNg%40mail.gmail.com.