> Thank you so much for your reply! This model is under-identified as
> there is indeterminacy issue with the parameters named "b", "r2", and
> "r3" in the model. Empirically (or locally) the model needs to find a
> solution for these 3 parameters with only 2 available pieces of information.
Agreed. Typically, the optimizer will find 'a' solution. But there are
in fact many possible solutions. Note that Mplus found another solution,
with different values for those unidentified parameters. The optimizer,
as you noted correctly, has no idea, and will not complain, as long as
it believes that a (local) minimum has been found.
The standard errors should (ideally) reveal the non-identification. If
there were no equality constraints in your model, it is very likely that
you would get a non-positive information matrix (if the model is not
identified), and lavaan would not compute standard errors (and give a
warning). If you have equality constraints, things are a bit more
complicated. Let me explain first show how standard errors are computed
in lavaan for your case:
fit.mg1=lavaan(mod.mg1,cdata.2,group="g",estimator="ML",information="observed",
control=list(trace=0,init_nelder_mead=TRUE),mimic="Mplus",verbose=T)
information <- lavTech(fit.mg1, "information.observed")
lavmodel <- fit.mg1@Model
H <- lavm...@con.jac
lambda <- lavm...@con.lambda
H0 <- matrix(0, nrow(H), nrow(H))
H10 <- matrix(0, ncol(information), nrow(H))
DL <- 2 * diag(lambda, nrow(H), nrow(H))
E3 <- rbind(cbind(information, H10, t(H)), cbind(t(H10),
DL, H0), cbind(H, H0, H0))
information <- E3
information.auginv <- MASS::ginv(information,
tol = .Machine$double.eps^(3/4))
npar <- lavm...@nx.free
information.inv <- information.auginv[1:npar, 1:npar, drop = FALSE]
# SEs
round(sqrt(diag(information.inv / (nobs(fit.mg1)))), 3)
The above chunk of code is what lavaan uses to compute the 'inverse' of
an 'augmented' information matrix. The augmentation has to do with the
equality constraints. As the equality constraints are often needed to
ensure identification, it is quite natural that the augmented
information matrix is not positive definite. That is why we have use a
generalized inverse (the MASS::ginv() call). And that is why you got
standard errors in lavaan.
I have not found a way to detect model under-identification in a
bullet-proof way, if the model contains equality constraints. But this
needs my attention anyway. Could you open an issue about this on github?
Then I will return to this when I have the time.
Yves.