Single Indicator Approach to Operationalizing LV

57 views
Skip to first unread message

Bob Vandenberg

unread,
Feb 21, 2019, 10:26:51 AM2/21/19
to lav...@googlegroups.com
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

Edward Rigdon

unread,
Feb 21, 2019, 11:00:20 AM2/21/19
to lav...@googlegroups.com
Bob--
Should that not be a "c" before each set of fixed values in parents, not a b c d e f?
Ed Rigdon

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Bob Vandenberg

unread,
Feb 21, 2019, 11:11:11 AM2/21/19
to lav...@googlegroups.com
Ed,

Thanks for the quick response.  I removed the a through e, but I’m now getting the following error:

Error in parse(text = x, keep.source = FALSE) : 
  <text>:1:8: unexpected ','
1: ~ (.913,
           ^

Any suggestions? - Bob

Christopher David Desjardins

unread,
Feb 21, 2019, 11:57:01 AM2/21/19
to lavaan

Hi Bob,
I think Ed’s comment was that you should be using the c() function. So, this

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

would be

AvgFitFx =~ c(.913,.92)*AvgFit
 AvgFit ~~ c(.107, .094)*AvgFit

 Afft1Fx =~ c(.957, .958)*AffAvgt1
 AffAvgt1 ~~ c(.085, .081)*AffAvgt1

 Trnt1Fx =~ c(.922, .921)*TrnAvgt1
 TrnAvgt1 ~~ c(.119, .123)*TrnAvgt1

Edward Rigdon

unread,
Feb 21, 2019, 12:26:44 PM2/21/19
to lav...@googlegroups.com
Bob--
There needs to be a "c" (for the concatenate() function, before each pair of values in parens.
Can you show more of your revised code?
--Ed Rigdon

Bob Vandenberg

unread,
Feb 21, 2019, 12:39:15 PM2/21/19
to lav...@googlegroups.com
Ed, 

Thanks again.  Per your request:

#fixed loadings and error-uniqueness terms
AvgFitFx =~ (.913, .92")*AvgFit
AvgFit ~~ (.107, .094)*AvgFit

Afft1Fx =~ (.957, .958)*AffAvgt1
AffAvgt1 ~~ (.085, .081)*AffAvgt1

Trnt1Fx =~ (.922, .921)*TrnAvgt1
TrnAvgt1 ~~ (.119, .123)*TrnAvgt1

#Path Model
Afft1Fx ~ AvgFitFx
Trnt1Fx ~ AvgFitFx
NPVHC ~ AvgFitFx + Trnt1Fx
'

Edward Rigdon

unread,
Feb 21, 2019, 12:45:55 PM2/21/19
to lav...@googlegroups.com
Right--so try this:
#fixed loadings and error-uniqueness terms
AvgFitFx =~ c(.913, .92")*AvgFit
AvgFit ~~ c(.107, .094)*AvgFit

Afft1Fx =~ c(.957, .958)*AffAvgt1
AffAvgt1 ~~ c(.085, .081)*AffAvgt1

Trnt1Fx =~ c(.922, .921)*TrnAvgt1
TrnAvgt1 ~~ c(.119, .123)*TrnAvgt1

#Path Model
Afft1Fx ~ AvgFitFx
Trnt1Fx ~ AvgFitFx
NPVHC ~ AvgFitFx + Trnt1Fx
'
c() is the concatenate function in R.
--Ed R

Bob Vandenberg

unread,
Feb 21, 2019, 12:50:33 PM2/21/19
to lav...@googlegroups.com
Ed and Chris,

I got it to work.  Thank you so much.  It’s always the simplest things isn’t it?  

Bob
Reply all
Reply to author
Forward
0 new messages