Hi,
I encountered the same issue with models that were working previously and now produce the same error and no output. When running a model with DWLS estimation that has no convergence problems, the warning message for emptystand is NULL rather than 0 so it seems to fail the check on line 710.
I was able to do a quick fix by adjusting the code on lines 481-483 of usermodel.R from
if (estimation == "DWLS") {
emptystand <- .tryCatch.W.E(Fit_stand <- sem(Model1,
sample.cov = S_Stand, estimator = "DWLS", WLS.V = W_stand,
std.lv =
std.lv, sample.nobs = 2, optim.dx.tol = +Inf))
}
to
if (estimation == "DWLS") {
emptystand <- .tryCatch.W.E(Fit_stand <- sem(Model1,
sample.cov = S_Stand, estimator = "DWLS", WLS.V = W_stand,
std.lv =
std.lv, sample.nobs = 2, optim.dx.tol = +Inf))
if (is.null(emptystand$warning$message[1])) {
emptystand$warning$message[1] <- 0
}
}
But I think this is a bug that needs to be fixed because there were otherwise no issues with the model solution.