SEM using correlation matrix in lavaan

54 views
Skip to first unread message

Asghar Minaei

unread,
Sep 25, 2026, 4:08:49 PM (3 days ago) Sep 25
to lavaan
Hello everyone,

I have a question regarding conducting confirmatory factor analysis (CFA) in lavaan using a correlation matrix rather than a covariance matrix.

I am aware that lavaan allows a correlation matrix to be supplied as input through the "sample.cov" argument. However, my question concerns the statistical implications of doing so.

I have a correlation matrix and would like to fit a three-factor CFA model to it. In some sources, and particularly in Rex B. Kline(2023, p. 141), it is stated that conducting CFA or structural equation modeling based on a correlation matrix requires imposing nonlinear constraints manually. The rationale seems to be related to the fact that a correlation matrix has standardized variances and therefore does not contain the original variance information.

I would therefore like to ask:

1. Is it statistically appropriate to fit a CFA model directly to a correlation matrix in lavaan by specifying it through "sample.cov"?
2. If so, does lavaan automatically handle the implications of using a correlation matrix, or are additional constraints or adjustments required?
3. What exactly does Kline mean by the statement that nonlinear constraints need to be imposed when CFA/SEM is based on a correlation matrix?
4. Are there any references, papers, or examples that discuss this issue specifically in relation to lavaan?

I would be very grateful for any clarification or references, particularly from those who have experience with CFA/SEM based on correlation matrices.

Thank you in advance for your help.
AsgharScreenshot (1785).png


Yves Rosseel

unread,
Sep 27, 2026, 4:23:30 AM (yesterday) Sep 27
to lav...@googlegroups.com
For the analysis of correction structures, you need to add the
'correlation = TRUE' option. lavaan then treats the input matrix
(provided by sample.cov=) as a correlation matrix, and will provide
correct standard errors and test statistics.

(lavCor() has nothing to do with this)

Yves.

Asghar Minaei

unread,
3:28 AM (19 hours ago) 3:28 AM
to lavaan
Dear Yves,

Thank you very much for taking the time to answer my question. Following your suggestion, I tried to analyze the correlation matrix reported in Section 3 of Table 1 (p. 321) of the Cudeck (1989) article using the code below:

Screenshot (1789).png

However, lavaan returned the following error message:

Screenshot (1788).png

Could you please let me know where the problem is in my code and how I should modify it to correctly analyze the correlation matrix using `correlation = TRUE`?

Thank you again for your response and for your help. 
Best,
Asghar
Cudeck1989_Analysis of Correlation Matrices Using Covariance Structure Models.pdf

balal izanloo

unread,
4:31 AM (18 hours ago) 4:31 AM
to lav...@googlegroups.com
greatrings
you have specified one value in the diagonal of the matrix wrongly 1.46 should be .46. so it work for me

corm <- matrix(c(1.00,  .44, .41 ,.29, .33, .25,
.44,  1.00, .35, .35, .32, .33,
.41,  .35,  1.00, .16, .19, .18,  
.29,  .35,  .16,  1.00, .59, .47,
.33,  .32,  .19,  .59,   1.00, .46,
.25,  .33,  .18,  .47,   .46,  1.00), nrow=6, byrow=T)

colnames(corm) <- rownames(corm)  <- c("French","English","History","Arithmetic","Algebra","Geometry")
corm

mod <-  "F1=~ French+English+History
         F2=~ Arithmetic+Algebra+Geometry"
res <- lavaan::cfa(mod, sample.cov=corm, sample.nobs=220, std.lv=T, correlation=T)
print(res)

--
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 visit https://groups.google.com/d/msgid/lavaan/f84c536a-aa04-409f-9983-6e8ca1a41cadn%40googlegroups.com.

balal izanloo

unread,
4:36 AM (18 hours ago) 4:36 AM
to lav...@googlegroups.com
greatrings
you have specified one value in the diagonal of the matrix wrongly 1.46 should be .46. so it work for me

corm <- matrix(c(1.00,  .44, .41 ,.29, .33, .25,
.44,  1.00, .35, .35, .32, .33,
.41,  .35,  1.00, .16, .19, .18,  
.29,  .35,  .16,  1.00, .59, .47,
.33,  .32,  .19,  .59,   1.00, .46,
.25,  .33,  .18,  .47,   .46,  1.00), nrow=6, byrow=T)

colnames(corm) <- rownames(corm)  <- c("French","English","History","Arithmetic","Algebra","Geometry")
corm

mod <-  "F1=~ French+English+History
         F2=~ Arithmetic+Algebra+Geometry"
res <- lavaan::cfa(mod, sample.cov=corm, sample.nobs=220, std.lv=T, correlation=T)
lavaan::summary(res, fit=TRUE, ci=TRUE, nd=3)


On Mon, Sep 28, 2026 at 10:58 AM Asghar Minaei <asghar...@gmail.com> wrote:

Asghar Minaei

unread,
5:05 AM (17 hours ago) 5:05 AM
to lav...@googlegroups.com
Thank you very much for your careful attention and for pointing this out. I made the correction, and the analysis worked for me as well.
However, the main issue is that the standard errors and the chi-square value I obtain are different from those reported in Table 4 of Cudeck (1989).
I am trying to understand the reason for this discrepancy and whether there is an additional option or specification that needs to be used in lavaan to reproduce Cudeck's result

balal izanloo

unread,
5:31 AM (17 hours ago) 5:31 AM
to lav...@googlegroups.com

compare previous results with new one (based on correlation as cov matrix not cor matrix). The difference between the results of the two methods amounts to a few decimal places, and at times, they are identical. Of course, incorporating the views of other group members is also beneficial.


rescov <- lavaan::cfa(mod, sample.cov=corm, sample.nobs=220, std.lv=T, correlation=F)
print(rescov)
lavaan::summary(rescov, fit=TRUE, ci=TRUE, nd=3)


Edward Rigdon

unread,
6:47 AM (16 hours ago) 6:47 AM
to lav...@googlegroups.com
What package did Cudeck report using? Different SEM packages use different optimization approaches. Some packages are optimized for strictly correct models while other packages are optimized assuming that models will typically have small discrepancies. If the chi-square for this model is not exactly 0, then I might expect some small differences between solutions, even though both packages relied upon "maximum likelihood" estimation. I believe that lavaan allows you to alter the precision of its optimizer--how much of a change in values from iteration to iteration amounts to a meaningful improvement. You might try changing that (no, I have never felt the need) to see whether your results come closer to those that Cudeck reported.

Reply all
Reply to author
Forward
0 new messages