I need to predict score for the latent variable in my model by using either Bayes estimation or the maximum posterior likelihood method. How can I do that with lavaan and blavaan?
The result is below. I know fit indices are not good but I want to know how to predict scores for latent variable. I am going to improve the model later.
lavaan (0.5-23.1097) converged normally after 78 iterations
Used Total
Number of observations 19600 21365
Estimator DWLS Robust
Minimum Function Test Statistic 4659.730 4582.862
Degrees of freedom 36 36
P-value (Chi-square) 0.000 0.000
Scaling correction factor 1.017
Shift parameter 2.682
for simple second-order correction (Mplus variant)
Model test baseline model:
Minimum Function Test Statistic 25726.117 22863.878
Degrees of freedom 78 78
P-value 0.000 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 0.820 0.800
Tucker-Lewis Index (TLI) 0.609 0.568
Robust Comparative Fit Index (CFI) NA
Robust Tucker-Lewis Index (TLI) NA
Root Mean Square Error of Approximation:
RMSEA 0.081 0.080
90 Percent Confidence Interval 0.079 0.083 0.078 0.082
P-value RMSEA <= 0.05 0.000 0.000
Robust RMSEA NA
90 Percent Confidence Interval NA NA
Standardized Root Mean Square Residual:
SRMR 0.012 0.012
Weighted Root Mean Square Residual:
WRMR 7.318 7.318
Parameter Estimates:
Information Expected
Standard Errors Robust.sem
Latent Variables:
Estimate Std.Err z-value P(>|z|)
control_labor =~
lincome 1.000
lwh 0.478 0.009 51.026 0.000
mjob -0.469 0.022 -21.766 0.000
pos 0.881 0.024 36.387 0.000
Regressions:
Estimate Std.Err z-value P(>|z|)
control_labor ~
urbanrate 0.355 0.026 13.605 0.000
lhincome 0.502 0.007 74.291 0.000
spland_hec 0.009 0.002 4.613 0.000
owing -0.033 0.009 -3.789 0.000
poor -0.008 0.002 -3.930 0.000
manu_mine 0.512 0.014 35.416 0.000
uti 0.632 0.064 9.901 0.000
construction 0.399 0.027 15.023 0.000
lowser 0.583 0.013 46.266 0.000
hiser 0.849 0.017 51.421 0.000
lm1ac5 0.015 0.015 1.005 0.315
ltedu 0.087 0.008 10.569 0.000
lf_prov14 -0.010 0.005 -2.040 0.041
lwh ~
lm1ac5 -0.146 0.013 -11.283 0.000
m1ac2 0.118 0.009 13.477 0.000
major -0.136 0.013 -10.645 0.000
migrated 0.075 0.014 5.495 0.000
ttnt 0.012 0.012 1.045 0.296
married 0.296 0.013 22.101 0.000
lincome ~
m1ac2 0.216 0.009 23.088 0.000
major 0.164 0.014 11.892 0.000
migrated 0.112 0.014 8.117 0.000
ttnt -0.001 0.012 -0.104 0.917
married 0.148 0.016 9.404 0.000
mjob ~
lm1ac5 0.024 0.034 0.713 0.476
m1ac2 0.059 0.020 2.902 0.004
major -0.236 0.029 -8.197 0.000
ttnt -0.579 0.026 -22.481 0.000
married 0.545 0.034 16.252 0.000
pos ~
lm1ac5 0.258 0.038 6.804 0.000
m1ac2 -0.149 0.020 -7.366 0.000
major 0.228 0.033 6.856 0.000
ttnt 0.078 0.023 3.312 0.001
married 0.050 0.032 1.574 0.116
Covariances:
Estimate Std.Err z-value P(>|z|)
.lincome ~~
.lwh 0.118 0.007 17.398 0.000
.lwh ~~
.pos 0.051 0.008 6.196 0.000
.mjob 0.157 0.006 27.567 0.000
.lincome ~~
.pos 0.131 0.013 10.436 0.000
Intercepts:
Estimate Std.Err z-value P(>|z|)
.lincome -0.274 0.064 -4.303 0.000
.lwh 6.819 0.056 121.468 0.000
.mjob 0.000
.pos 0.000
.control_labor 0.000
Thresholds:
Estimate Std.Err z-value P(>|z|)
mjob|t1 -0.837 0.142 -5.898 0.000
pos|t1 0.222 0.167 1.327 0.185
pos|t2 3.800 0.158 24.105 0.000
pos|t3 5.177 0.162 32.021 0.000
pos|t4 6.585 0.168 39.223 0.000
Variances:
Estimate Std.Err z-value P(>|z|)
.lincome 0.476 0.013 36.445 0.000
.lwh 0.367 0.004 94.552 0.000
.mjob 1.018
.pos 1.064
.control_labor -0.083 0.013 -6.616 0.000
Scales y*:
Estimate Std.Err z-value P(>|z|)
mjob 1.000
pos 1.000