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