Your understanding is correct. It's possible that you may have calculated the correlation incorrectly. It would be helpful to see the code and output to better understand the issue. Can you share the code and output that you used to calculate the correlation? That way we can help identify any potential errors or misunderstandings.
Best regards,
Mikko
From: lav...@googlegroups.com <lav...@googlegroups.com> on behalf of Serena <wsere...@gmail.com>
Date: Thursday, 23. May 2024 at 11.40
To: lavaan <lav...@googlegroups.com>
Subject: the standardized covariance is not equal to the correlation coefficient
Hi all,
To my understanding,
1) in simple linear regression, the standardized regression coefficient (beta coefficient) is equal to the correlation coefficient (Pearson's r) between the independent and dependent variables when both variables are standardized.
2) in bivariate scenarios (considering two variables), the standardized covariance and the correlation coefficient are numerically equivalent. This means that the value of the standardized covariance between two variables will be the same as the Pearson correlation
coefficient between those variables.
But in R, I found
1) the standardized regression coefficient is not equal to the correlation coefficient;
2) the standardized covariance and the correlation coefficient are also not equivalent.
(I extracted these parameters through CFA (multiple variables) analysis.)
Is this because the calculated functions are different or other reasons? Or is my understanding incorrect? Or is it because these are analyzing multiple variables simultaneously?
Thanks in advance,
Serena
--
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/0113e6c5-4a98-4835-a94f-dbbfa8c73949n%40googlegroups.com.
Hi,
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data = HolzingerSwineford1939)
parameterEstimates(fit, standardized = TRUE)
lavInspect(fit, "cor.lv")
Gives
…
19 visual ~~ visual 0.809 0.145 5.564 0 0.524 1.094 1.000 1.000 1.000
20 textual ~~ textual 0.979 0.112 8.737 0 0.760 1.199 1.000 1.000 1.000
21 speed ~~ speed 0.384 0.086 4.451 0 0.215 0.553 1.000 1.000 1.000
22 visual ~~ textual 0.408 0.074 5.552 0 0.264 0.552 0.459 0.459 0.459
23 visual ~~ speed 0.262 0.056 4.660 0 0.152 0.373 0.471 0.471 0.471
24 textual ~~ speed 0.173 0.049 3.518 0 0.077 0.270 0.283 0.283 0.283
> lavInspect(fit, "cor.lv")
visual textul speed
visual 1.000
textual 0.459 1.000
speed 0.471 0.283 1.000
The correlations, marked with colors, are the same as they should be. Without seeing your code or the output, it is difficult to say why that would be different in your case.
Best regards,
Mikko
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/91398562-21ad-4e82-9ad1-52148935386an%40googlegroups.com.
Hi,
Seeing the full model specification would be helpful.
Best regards,
Mikko
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/42d9971e-c745-4b7e-9a46-18f94d2d7f27n%40googlegroups.com.
Hi,
That clarifies a lot and if you had included the model in the first post, we could have resolved the issue right away.
Because you are regressing the factors on covariates, these parameters
parameterEstimates(fit, standardized = TRUE):
var1 ~~ var2 -0.592 0.045 -13.061 0 -0.681 -0.503 -0.352
-0.352 -0.352
var1 ~~ var3 -0.856 0.059 -14.399 0 -0.973 -0.74 -0.544
-0.544 -0.544
var2 ~~ var3 1.595 0.065 24.642 0 1.468 1.722 0.803
0.803 0.803
are not factor covariances but residual covariances. They differ from factor covariances because they are not the factors, but the residuals from the regressions of the factors on the observed covariates.
Best regards,
Mikko
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/e49068db-f636-4b0d-ace2-4432efcda927n%40googlegroups.com.
parameterEstimates(fit, standardized = TRUE):
var1 ~~ var2 -0.592 0.045 -13.061 0 -0.681 -0.503 -0.352 -0.352 -0.352
var1 ~~ var3 -0.856 0.059 -14.399 0 -0.973 -0.74 -0.544 -0.544 -0.544
var2 ~~ var3 1.595 0.065 24.642 0 1.468 1.722 0.803 0.803 0.803
Hi,
You can get the model implied correlations with
lavInspect(fit_all, "cor.all")
If you want to get the correlations directly from the model, you need to make sure that the factors are modeled as exogenous variables without any incoming regression paths.
Best regards,
Mikko
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/49e42f41-651c-4a9d-86a8-f36f31e677aan%40googlegroups.com.