SAM and ESEM : Error in information + crossprod(H)

11 views
Skip to first unread message

Nathan Pudles

unread,
Jan 19, 2026, 10:42:08 AM (16 hours ago) Jan 19
to lavaan
Hi,

I'm trying to fit a model with SAM within the ESEM framework, which returns the following error message:
Error in information + crossprod(H) : non-conformable arrays

I'm using lavaan version  0.6.21.2434.

Here's an example using the data of study 1 from Marsh and Alamer (2024) 

> model <- ' ##Measurement #Block 1 efa("teacher")*Teacher_autonomy + efa("teacher")*Teacher_competence + efa("teacher")*Teacher_relatedness =~ T_autonomy1 + T_autonomy2 + T_autonomy3 + T_competence1 + T_competence2 + T_competence3 + T_relatedness1 + T_relatedness2 + T_relatedness3
#Block 2
efa("self")*Self_Meaning + efa("self")*Self_Confidence + efa("self")*Intrinsic_Motivation =~ S_meaning1 + S_meaning2 + S_meaning3 + S_confidence1 + S_confidence2 + S_confidence3 + S_Intrinsic1 + S_Intrinsic2 + S_Intrinsic3 #Block 3 Intent_to_Quit =~ Intent_to_withdraw1 + Intent_to_withdraw2 + Intent_to_withdraw3 + Intent_to_withdraw4 + Intent_to_withdraw5 ##Structural part Self_Meaning ~ Teacher_autonomy + Teacher_competence + Teacher_relatedness Self_Confidence ~ Teacher_autonomy + Teacher_competence + Teacher_relatedness Intrinsic_Motivation ~ Teacher_autonomy + Teacher_competence + Teacher_relatedness Intent_to_Quit ~ Self_Meaning + Self_Confidence + Intrinsic_Motivation + Teacher_autonomy + Teacher_competence + Teacher_relatedness '

sam_res <- sam(model = model, data = data_ex, mm.list = list(teacher = c("Teacher_autonomy", "Teacher_competence", "Teacher_relatedness"), self = c("Self_Meaning", "Self_Confidence", "Intrinsic_Motivation"), Quit = "Intent_to_Quit"), mm.args = list(estimator = "MLR"), struc.args = list(estimator = "ML"), sam.method = "local", std.lv = TRUE, rotation = "geomin", rotation.args = list(geomin.epsilon = 0.001), output = "lavaan")
Error in information + crossprod(H) : non-conformable arrays

Best regards,

Nathan

Felipe Vieira

unread,
Jan 19, 2026, 10:56:19 AM (16 hours ago) Jan 19
to lav...@googlegroups.com
Hi,

Just by looking at the error message, I think it is related to a small bug that was fixed a few months ago. Try a newer version of lavaan. 

If that doesn't work, I will look into it more carefully. 

Best, 
Felipe. 

--
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/a7d3530b-ea8e-418b-8e8d-2add9089476dn%40googlegroups.com.

Felipe Vieira

unread,
Jan 19, 2026, 11:26:20 AM (15 hours ago) Jan 19
to lav...@googlegroups.com
Hi, 

In the end, I checked it, and I was wrong. It seems to be a bug that creates a dimension mismatch. 

I will try to fix it or file an issue on GitHub. 

Best, 
Felipe. 


Reply all
Reply to author
Forward
0 new messages