I’m converting from Mplus to lavaan for both research and teaching purposes. With one exception, I was easily able to mimic the vast majority of my Mplus modules using lavaan. The exception has me stumped and I’m hoping someone on this forum may be able to help me. Specifically, I cannot mimic my Mplus single indicator approach to operationalizing the latent variables. The approach I use is to fix the lambda from the latent variable to its manifest indicator (average of a set of items representing some construct) to the square root of that manifest variable’ reliability (composite reliability), and then I fix the error-uniqueness term to (1 minus the reliability) times the variance of the manifest indicator. The following is the syntax and the output. I thank all of you in advance for taking a look and correcting the error of my ways. FYI - it’s a multi-sample example.
Bob Vandenberg
>
time1.model.SI<-'
+ #fixed loadings and error-uniqueness terms
+ AvgFitFx =~ a(.913,.92)*AvgFit
+ AvgFit ~~ b(.107, .094)*AvgFit
+
+ Afft1Fx =~ c(.957, .958)*AffAvgt1
+ AffAvgt1 ~~ d(.085, .081)*AffAvgt1
+
+ Trnt1Fx =~ e(.922, .921)*TrnAvgt1
+ TrnAvgt1 ~~f(.119, .123)*TrnAvgt1
+
+ #Path Model
+ Afft1Fx ~ AvgFitFx
+ Trnt1Fx ~ AvgFitFx
+ NPVHC ~ AvgFitFx + Trnt1Fx'
> path.model.time1fitSI<-sem(
time1.model.SI, data=MGMT9610r, group = "JobSeek", meanstructure = TRUE, mimic = "mplus")
Warning messages:
1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING:
Could not compute standard errors! The information matrix could
not be inverted. This may be a symptom that the model is not
identified.
2: In lav_object_post_check(object) :
lavaan WARNING: some estimated ov variances are negative
3: In lav_object_post_check(object) :
lavaan WARNING: some estimated lv variances are negative
> summary(path.model.time1fitSI, fit.measures=TRUE, standardized=TRUE)
lavaan 0.6-3 ended normally after 550 iterations
Optimization method NLMINB
Number of free parameters 32
Number of observations per group
1 300
2 300
Number of missing patterns per group
1 1
2 1
Estimator ML
Model Fit Test Statistic NA
Degrees of freedom -4
Minimum Function Value 0.0000000000000
Chi-square for each group:
1 NA
2 NA
User model versus baseline model:
Comparative Fit Index (CFI) NA
Tucker-Lewis Index (TLI) NA
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -3103.942
Loglikelihood unrestricted model (H1) -3103.942
Number of free parameters 32
Akaike (AIC) 6271.885
Bayesian (BIC) 6412.587
Sample-size adjusted Bayesian (BIC) 6310.995
Root Mean Square Error of Approximation:
RMSEA NA
90 Percent Confidence Interval NA NA
P-value RMSEA <= 0.05 NA
Standardized Root Mean Square Residual:
SRMR 0.000
Parameter Estimates:
Information Observed
Observed information based on Hessian
Standard Errors Standard
Group 1 [1]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
AvgFitFx =~
A (Eia0:cnff") 1.000 0.089 0.111
Afft1Fx =~
A 0.957 2.569 2.573
Trnt1Fx =~
T (Eie0:cnff") 1.000 NaN NaN
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Afft1Fx ~
AvgFitFx 40.120 NA 1.330 1.330
Trnt1Fx ~
AvgFitFx -1.122 NA NaN NaN
NPVHC ~
AvgFitFx 3.018 NA 0.268 0.272
Trnt1Fx -0.013 NA NaN NaN
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Afft1Fx ~~
.NPVHC -1.075 NA -0.457 -0.481
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.AvgFit 3.052 NA 3.052 3.803
.AffAvgt1 1.035 NA 1.035 1.037
.TrnAvgt1 3.166 NA 3.166 3.551
.NPVHC 298.957 NA 298.957 302.918
AvgFitFx 0.000 0.000 0.000
.Afft1Fx 0.000 0.000 0.000
.Trnt1Fx 0.000 NaN NaN
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.A (Eib0:cnff") 0.636 NA 0.636 0.988
.A (Eid0:cnff") -5.601 NA -5.601 -5.619
.T (Eif0:cnff") 3.613 NA 3.613 4.547
.N 0.902 NA 0.902 0.926
A 0.008 NA 1.000 1.000
.A -5.537 NA -0.769 -0.769
.T -2.828 NA NaN NaN
Group 2 [2]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
AvgFitFx =~
AvgFit 1.000 0.145 0.185
Afft1Fx =~
AffAvgt1 0.958 1.688 1.714
Trnt1Fx =~
TrnAvgt1 1.000 NaN NaN
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Afft1Fx ~
AvgFitFx 15.839 NA 1.299 1.299
Trnt1Fx ~
AvgFitFx -1.040 NA NaN NaN
NPVHC ~
AvgFitFx 1.638 NA 0.237 0.221
Trnt1Fx 0.002 NA NaN NaN
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Afft1Fx ~~
.NPVHC -0.480 NA -0.328 -0.315
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.AvgFit 3.053 NA 3.053 3.901
.AffAvgt1 3.250 NA 3.250 3.300
.TrnAvgt1 1.144 NA 1.144 1.269
.NPVHC 299.228 NA 299.228 279.845
AvgFitFx 0.000 0.000 0.000
.Afft1Fx 0.000 0.000 0.000
.Trnt1Fx 0.000 NaN NaN
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.AvgFit 0.592 NA 0.592 0.966
.AffAvgt1 -1.880 NA -1.880 -1.939
.TrnAvgt1 3.501 NA 3.501 4.305
.NPVHC 1.087 NA 1.087 0.951
AvgFitFx 0.021 NA 1.000 1.000
.Afft1Fx -2.135 NA -0.687 -0.687
.Trnt1Fx -2.711 NA NaN NaN
Warning messages:
1: In sqrt(ETA2) : NaNs produced
2: In sqrt(ETA2) : NaNs produced
3: In sqrt(ETA2) : NaNs produced
4: In sqrt(ETA2) : NaNs produced
5: In sqrt(ETA2) : NaNs produced
6: In sqrt(ETA2) : NaNs produced