Lavaan SEM and SPSS regression results are different

330 views
Skip to first unread message

Hazel

unread,
Jul 28, 2022, 3:32:58 AM7/28/22
to lavaan

Hello

I'm using lavaan  to run CFA and SEM. However, the regression coefficients from lavaan are very different from the results from regression coefficients from SPSS. I know the algorithms behind the packages and software may vary since I use the mean of the factor to do the regression analysis in SPSS.  But the results should not be this contradicting?

Is there something wrong with the data or it is a normal circumstances?

The results are shown as follow:

The results from SPSS

截圖 2022-07-25 下午4.24.07.png

The results from lavaan.

截圖 2022-07-25 下午4.23.40.png


Thank you very much.


Mauricio Garnier-Villarreal

unread,
Jul 28, 2022, 8:42:15 AM7/28/22
to lavaan
If you can run the SEM, why are you running a separate regression in SPSS?

What do you mean by " I use the mean of the factor to do the regression analysis in SPSS "? How did you extrated the factor scores?

There are many issues with using single factor socres for regression, and there are several ways to fix it. But I dont understand what you are doing

Chiu HsuenChi

unread,
Jul 28, 2022, 9:51:06 AM7/28/22
to lav...@googlegroups.com
Hi, 

Sorry for the confusion.
We ran the regressions in SPSS as our preliminary step of our research. We wanted to see how the IVs related with the DVs, so we simply ran several regressions in SPSS to do so.
We later decided to focus on SEM to conduct our research, and the model fit quite well after some modifications (CFI: 0.938, TLI: 0.928, RMSEA:  0.050, SRMR:  0.041). 
However the regressions in SEM turned out to be contradictory to the regression results in SPSS we ran earlier. 

By "I use the mean of the factor to do the regression analysis in SPSS" I mean I simply compute the mean of factor by adding all the items and divide it by the number of items. For example, FD_mean = (FD_1+FD_2+FD_3)/3. And we use these factor means as our IVs and DVs to run the regressions in the preliminary step.

We're surprised how regression coefficients can be this different in these two cases.

Thanks again for the response.
Please let me know if I did not make myself clear.




Mauricio Garnier-Villarreal <mauga...@gmail.com> 於 2022年7月28日 週四 晚上8:42寫道:
--
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/0PA3vT0aRyM/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/306ade95-df90-4372-8c12-f4e6fcf7788cn%40googlegroups.com.

Prof. Gavin Brown

unread,
Jul 28, 2022, 10:02:58 AM7/28/22
to lavaan
i suspect what you mean is that either the values of the paths or the signs of the paths changed when you moved to SEM.
this can happen for at least 2 reasons.
1. SEM includes residuals which are retained in the predictors in regression.
2. SEM isolates the unique effect of correlated or multicollinear predictors. if the correlation between predictors is weak then it is possible to have a non-transitive impact on a dependent variable. So if A+B are positively correlated, you expect their effect on C to be equally possible. But SEM can identify the unique effect of A and B on C which can be A+B positive, but A+C positive and B+C negative. transitivity of relations is not required when A+B has a correlation much lower than 1.00

Jeremy Miles

unread,
Jul 28, 2022, 11:06:15 AM7/28/22
to lav...@googlegroups.com

I would try running exactly the same regression in Lavaan and SPSS, with the same data (i.e. a saturated model, something like:

PU ~ capabiity_mean + FD_mean +  CM_mean  + AT_mean

)

That should give identical estimates, standard errors, etc (to 3rd decimal place or so).

If you've established that that is the same, then you can start to explore the differences.

But we'd expect SEM to give different results - if it gave the same results as regression it wouldn't have a purpose. (Also, check your standardized parameters.)

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/CACFneNyYEo4dswP%3Dk5FcwAywzko-8Q9AcvE0QjmS6jXMbAYF8Q%40mail.gmail.com.

Brett

unread,
Jul 28, 2022, 12:58:37 PM7/28/22
to lav...@googlegroups.com
You are making different assumptions about the measurement error in each approach and this puts at least one variable on a different scale (if e.g. factor variance identification is used) and will change the structural relationship. The coefficients in each model represent quite different quantities.

Mauricio Garnier-Villarreal

unread,
Jul 29, 2022, 8:06:37 AM7/29/22
to lavaan
If you have differences between a manifest variable model, and a latent variable model. This would suggest to me that there is a large effect of measurement error in the variables.

Can you share the measurement model? Factor loadings and residual correlations, inclusing the standardized effects.


PS: ehwn using composite variables (mean of items), dont call this a "factor" score, as a this relates to the use of a factor analysis model. I would recommend you to called it composite, scale, or total score. Just for clarity

Christian Arnold

unread,
Jul 29, 2022, 8:43:32 AM7/29/22
to lav...@googlegroups.com
Hi,

from my point of view we have not received enough information from Hazel. There can be many reasons for these results (some have already been addressed). In the simplest case, one or another indicator was reverse coded and that was not taken into account when calculating the means. 

Example:

library(lavaan)

pop.model <- "
f1 =~ 1.0 * v1 + 0.8 * v2 + 0.9 * v3
f2 =~ 1.0 * v4 + -1.0 * v5 + -0.9 * v6
f2 ~ 0.6 * f1
"

model <- "
f1 =~ v1 + v2 + v3
f2 =~ v4 + v5 + v6
f2 ~ f1
"

set.seed(1)
data <- simulateData(pop.model, sample.nobs = 100000)
fit <- sem(model = model, data = data)
pe <- parameterEstimates(fit)
pe[pe$op == "~",]

data$f1 <- (data$v1 + data$v2 + data$v3) / 3
data$f2 <- (data$v4 + data$v5 + data$v6) / 3

summary(lm(f2 ~ f1, data = data))


Best 

Christian


Von: lav...@googlegroups.com <lav...@googlegroups.com> im Auftrag von Mauricio Garnier-Villarreal <mauga...@gmail.com>
Gesendet: Freitag, 29. Juli 2022 14:06
An: lavaan <lav...@googlegroups.com>
Betreff: Re: Lavaan SEM and SPSS regression results are different
 
Reply all
Reply to author
Forward
0 new messages