Hi all,
I am using lavaan package for mediation analysis considering both exposure and mediator as binary variables. I considererd estimator = DWLS, with "ordered = c(A1, A2)" option as well as robust standard errors (se = "robust").
SEM_model <- "
A1_bin ~ g1 + c1 + c2+ c3
A2_bin ~ a*A1_bin+ g2 + c1 + c2+ c3
Y ~ b*A1_bin + c*A2_bin + c1 + c2 + c3
fit_model<- lavaan::sem(SEM_model, data = dataset,ordered = c("A1_bin", "A2_bin"), estimator ="DWLS" , se= "robust" )
With these options I am obtaining really high values of the standard errors for the indirect effect (e*c) and with another settings my model does not work at all. I don't know if maybe I have to consider other estimates and estimators for standard errors for binary variables.
I will appreciate any help!
Thank you!
Claudia