Structural Model (regression) ~ Lavaan

109 views
Skip to first unread message

Yashin Abdullah Ali

unread,
Apr 7, 2022, 10:00:37 PM4/7/22
to lavaan
Hi Everyone, 

While using the lavaan package, I am a bit confused about the Structural part of the model for SEM analysis. I am using the Theory of planned behavior to validate through my empirical dataset. 

I have 5 latent variables each with 4 measured indicators. in my measurement model, i don't have problems. 

But I am confused about the structural part (regressions) of the model.  All of these latent variables will have an effect on one latent variable which in turn predicts the actual behavior. Here is the piece of the code I have written: 

 M_model <-
 'Attitude =~ AQ2ATTITUDE_r1 + AQ2ATTITUDE_r2 + AQ2ATTITUDE_r3
  PBC =~ AQ1PBC_r1 + AQ1PBC_r2 + AQ1PBC_r3 + AQ1PBC_r4 + AQ1PBC_r5 + AQ1PBC_r6
  SubNorms=~ AQ3SN_r1 + AQ3SN_r2 + AQ3SN_r3 + AQ3SN_r4 + AQ3SN_r5
  EConcern =~ AQ5EC_r1 + AQ5EC_r2 + AQ5EC_r3
  EVOIntent =~ AQ7repurschase_r1 + AQ7repurschase_r2 + AQ7repurschase_r3
 ## Structural Model ##
Attitude ~ EVOIntent
SubNorms ~ EVOIntent
PBC ~ EVOIntent
EConcern   ~ EVOIntent 
'
Running this code gives me an error '' sample covariance matrix is not positive-definite''

Is this due to the small sampling size? 

Christian Arnold

unread,
Apr 8, 2022, 1:54:50 AM4/8/22
to lav...@googlegroups.com
Aside from the possible sample size issue (I can't find details in your email), the structural model is not specified in terms of the TPB. Intention does not explain attitude. Intention does not explain subjective norm and so on.

Best 

Christian 


Von: lav...@googlegroups.com <lav...@googlegroups.com> im Auftrag von Yashin Abdullah Ali <yashi...@gmail.com>
Gesendet: Freitag, 8. April 2022, 04:00
An: lavaan <lav...@googlegroups.com>
Betreff: Structural Model (regression) ~ Lavaan
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/e721193d-3738-4ca3-878b-bdef77890bdbn%40googlegroups.com.

shamel...@queensu.ca

unread,
Apr 8, 2022, 8:54:04 AM4/8/22
to lavaan
If all of the predictors in the theory of planned behavior have an effect on one LV (EVOIntent), the structural part of the model should look like this (the DV  needs to be on the left side of the equation):

## Structural Model ##
 EVOIntent  ~   Attitude 
EVOIntent  ~  SubNorms
EVOIntent  ~  PBC
EVOIntent  ~  EConcern

Rönkkö, Mikko

unread,
Apr 8, 2022, 9:00:44 AM4/8/22
to lav...@googlegroups.com

Hi,

 

Non positive-definite covariance matrix means that at least one of the variables is an exact linear combination of other variables. In the regression context, this would be a violation of the “no perfect collinearity” assumption. You need to check your data. This will happen in small samples if your sample size is smaller than the number of variables and it can happen by change if you get close to this threshold.

 

https://stats.stackexchange.com/questions/30465/what-does-a-non-positive-definite-covariance-matrix-tell-me-about-my-data

 

Mikko

--

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.

Yashin Abdullah Ali

unread,
Apr 8, 2022, 11:03:05 AM4/8/22
to lavaan
download.png



I have tried reversing the regression, but still, the problem exists as follows: 

Error in lav_samplestats_icov(COV = cov[[g]], ridge = ridge.eps, x.idx = x.idx[[g]],  :
  lavaan ERROR: sample covariance matrix is not positive-definite.

But this is what I intend to find out in my structural part of the model, all of my predictors in terms of the theory of planned behavior have an effect on one LV, and in my case :(EVOIntent) as shown in the reference image of the research conducted by the authors: "Tomasetti, Aurelio Singer, Pierpaolo Troisi, Orlando Maione, Gennaro"

Reply all
Reply to author
Forward
0 new messages