Re: Digest for lavaan@googlegroups.com - 3 updates in 2 topics

72 views
Skip to first unread message

kma...@aol.com

unread,
Sep 22, 2022, 10:42:22 AM9/22/22
to lav...@googlegroups.com
Solene,
I am primarily a lavaan user.

Did you find an example in the tutorial that is no longer supported by lavaan?  I am not aware of any model syntax having been deprecated in lavaan.  If that is what you meant, can you provide an example of model syntax that no longer works?

For composite variables, the general strategy is (a) define a latent variable with no indicators, (b) define effects coefficients for the items on the latent variable, (c) fix the disturbance variance for the latent variable to zero.  (I am using the terminology of Bollen and Bauldry, 2011.  Perhaps you mean something different by 'composite'.)

Of course, there is no end to the linear combinations of items that can be used to form composite variables.  So, if you wish to estimate the values of the effect coefficients, it is up to the rest of your model to constrain which composite it should be.

Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/






On Wednesday, September 21, 2022, 10:38:28 PM EDT, lav...@googlegroups.com <lav...@googlegroups.com> wrote:








    lav...@googlegroups.com      Google Groups        




  Topic digest
View all topics  


    
    *   How to define a latent variable by substracting two other latent variables in SEM - 2 Updates
    
    *   Can't solve this error message : "The smallest eigenvalue of the EM estimated variance-covariance matrix (Sigma) is smaller than 1e-05;" - 1 Update
    

   How to define a latent variable by substracting two other latent variables in SEM  
   "Solène Frileux" <solene....@gmail.com>: Sep 21 05:14PM +0200    

Dear Edward,
 
I am coming back to this subject since I have been experiencing composite
models since last time, with cSEM for instance.
What do you think concerning this specific case of subtraction (where c is
defined by a-b, a and b being constructs) , would you rather
recommend using a composite variable for c or staying on your method ?
I am having some troubles defining substractions within composite models as
well.
Thanks a lot,
 
Solène
 
 
Le jeu. 4 août 2022 à 15:42, Edward Rigdon <edward...@gmail.com> a
écrit :
 
  
   Edward Rigdon <edward...@gmail.com>: Sep 21 04:51PM -0400    

I don't know what you will gain either way. We can infer the variance
of the difference from the variance and covariances of the original
variables, and we can also infer the relationship of the difference to any
other variable based on that variable's relationships to the original
variables. Modeling all of that won't tell you anything new, though it
might be convenient, say, to have lavaan derive some standard errors for
you.
Yes, the original variables likely will be different if they are
modeled as composites rather than as common factors, and so then the
difference will probably be different, too. It depends on your goals and
philosophy whetehr the difference is "good" or "bad."
--Ed Rigdon
 
On Wed, Sep 21, 2022 at 11:15 AM Solène Frileux <solene....@gmail.com>
wrote:
 
  


Back to top
   Can't solve this error message : "The smallest eigenvalue of the EM estimated variance-covariance matrix (Sigma) is smaller than 1e-05;"  
   "Solène Frileux" <solene....@gmail.com>: Sep 21 05:18PM +0200    

Dear Keith,
 
Which package do you generally use for composite variables ? cSEM or
seminr ? Concerning lavaan, I only find ancient tutorials about composite
variables, and they appear to be too old to apply to the actual way of
defining composite variables in lavaan.
Thanks a lot for your help,
 
Solène
 
 
Le mar. 6 sept. 2022 à 15:22, 'Nickname' via lavaan <lav...@googlegroups.com>
a écrit :
 
  


Back to top



You received this digest because you're subscribed to updates for this group. You can change your settings on the  group membership page .
To unsubscribe from this group and stop receiving emails from it send an email to  lavaan+un...@googlegroups.com .  



Solène Frileux

unread,
Oct 6, 2022, 9:25:34 AM10/6/22
to lavaan
Dear Keith,

Thank you, once again, for your precious help.

I was wondering whether lavaan still supports this syntax  <~  but I finally managed to use it.

However, I am now trying to make the following model work, and I do not get the mistake I might have made.

Model.4ter.metac <-     "

                          # Structural model
                          functionning  ~ metac
                          lifequality   ~ functionning + metac
                         
                          # Reflective measurement model
                          functionning  =~ EGF_cor + PSP_
                          lifequality   =~ SQOL + EQ5D_cor
                         
                          # Composite model
                          meta_mem  =~  0*AGE
                          meta_mem  ~ -1*zmem_obj + 1* zmem
                          meta_mem  ~~ 0* meta_mem
                         
                          meta_att  =~  0*AGEDEBUT_alcool
                          meta_att  ~ -1*zatt_obj + 1* zatt
                          meta_att  ~~ 0* meta_att
                         
                          meta_exec  =~  0*AGEDEBUT_sedatif
                          meta_exec  ~ -1*zexec_obj + 1* zexec
                          meta_exec  ~~ 0* meta_exec
                         
                          meta_lang  =~  0*AGEDEBUT_cannabis
                          meta_lang  ~ -1*zlang_obj + 1* zlang
                          meta_lang  ~~ 0* meta_lang
                         
                          # Second-order term
                          metac =~ meta_mem  + meta_att + meta_exec + meta_lang            
 
                          "        



Here is the message I get :

Avis : lavaan WARNING:
    Model estimation FAILED! Returning starting values.Error in solve.default(H, A) :
  Lapack routine dgesv: system is exactly singular: U[2,2] = 0


Do you have any advice ?

Thanks again,

Solène

Keith Markus

unread,
Oct 7, 2022, 10:54:54 AM10/7/22
to lavaan
Solene,
Looks like I messed up the thread topic.  My bad.

Here are a few things that jumped out at me.

1. Reflective measurement models with only two indicators are subject to empirical under-identification without sufficiently strong associations with other latent variables.  You have not included any association between the latent variable in your model, effectively fixing the covariance to zero.  That may explain the error.

2. I do not see that you used <~ but you do not need to, as explained in the model.syntax help file.  However, latentVariable =~ 0 is sufficient, there is no need to multiply the zero by another variable.  I am not sure if that is harmless or part of your problem.  (Again, see the example in the help file.)

3. I am not sure that I follow the logic of specifying a factor analysis of composite variables.  The factor causes its indicators but the basic idea behind a composite is that it is fully determined by its components.  That is why you fix the disturbance to zero.  In your model, the common factor is common variance among the composites that is not explained by their components but that seems at odds with the definition of a composite, there should be no such variance.  This may also explain the error, or it may be that it would converge to zero factor loadings.

4. If 'z' stands for z score, bear in mine that analyzing a correlation matrix will produce incorrect inferential statistics.  A complex set of constraints are required to obtain correct inferential statistics because the variances are not random variables in a correlation matrix.  I would avoid analyzing z scores if possible.

5. Finally, it seems to me that you are trying to do too much all at once, which makes debugging harder.  I would suggest starting with the two-factor CFA, then adding one composite at a time, building up the model piece by piece.  However, given point 3 above, you may need to re-think what you are building toward.

HTH,

Keith Markus

unread,
Oct 7, 2022, 11:12:08 AM10/7/22
to lavaan
Solene,
Ed Rigdon just posted this on SEMNET:
>>>
Don't use the "formative operator" <~. Yves has said before that it is wonky.

Instead of:

              IC <~ 1*EMO + VIT + COG + MOB + VIS + HEAR

Use

IC =~ 0* some observed variable in model    # to create IC as a latent
IC ~ EMO + VIT + COG + MOB + VIS + HEAR  # unless you really want the 1
IC ~~ 0*IC                                                            # no residual variance

--Ed Rigdon
>>>

So, it looks like I missed the memo on <~.  Fortunately, I never used it anyway.

However, here is an example of the approach that I described, which also runs without error.  As you can see in my syntax. I do not multiply by an arbitrary variable, I just use 0.

simModel <- '
  Composite =~ 0
  Composite ~ .5 * component1 + .5 * component2
  Composite ~~ 0 * Composite
  component1 ~~ .3*component2
  component1 ~~ 1*component1
  component2 ~~ 1*component2
' # end model

myData <- simulateData(model=simModel)

fitModel <- '
  Composite =~ 0
  Composite ~ .5 * component1 + .5 * component2
  Composite ~~ 0 * Composite
  component1 ~~ component2
  component1 ~~ component1
  component2 ~~ component2
' # end model

myFit <- lavaan(model=fitModel, data=myData)
summary(myFit)

Solène Frileux

unread,
Oct 7, 2022, 11:20:21 AM10/7/22
to lav...@googlegroups.com
Dear Keith,

Those points are really interesting and learn me a lot.
So you think we should not use zscores ? z indeed corresponds to z scores.
I agree with you on point 3 as well.
I was also wondering which variable to use to define the composite variable as a dummy factor, so I thank you for explaining to me that we can just define it this way :compositeVariable=~0
I will try changing several things and doing it step by step.
All in all, this changes the way I see things, it is very formative.
Thanks again.

Solène


--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/8jq_dOUQNqU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/e097f9b6-f215-4c7f-aa60-e7f1ed5c9d95n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages