On 11/08/2012 05:22 PM, Ruben Arslan wrote:
> Hey,
>
> with one model I fit I got error messages when using utility functions,
> but not in the sem() function or
> in the model summary. So for one model I got
>
> model3sem <- sem(model=model3, data=mtfs,fixed.x=F,missing="fiml",
std.lv=T)
> summary(model3sem,fit.measures=T,standardized=T)
> ## lavaan (0.5-10) converged normally after 1760 iterations
That is a lot of iterations... must be a trickly model.
> in the model summary and no error message upon fitting it, and
> the converged flag in the "Fit" slot set to true (checked with str() ).
Good. You can also check it as follows:
inspect(fit, "converged")
> but when I tried to display the modindices I got
>
> head(modificationindices(model3sem)[order(modificationindices(model3sem)$mi,na.last=T,decreasing=T),],12)
> ## Error: system is computationally singular: reciprocal condition
> number = ## 6.30392e-21
Hm. It looks like there is numerical instability in the model after all.
> and when I extracted some coefficients (which worked, except that the
> fmi was always NA)
> parameterEstimates(model3sem, standardized=T)
> ## Warning: lavaan WARNING: model has NOT converged!
This warning is related to the fmi for which we need to fit a new model,
and this may fail, especially if the original one was a borderline fit.
> I originally started writing the mail, because I was stumped, but I
> fixed it by
> dummy-coding two unordered factor variables that I had and decided to
> send the mail anyway.
> I had seen the warning, but not understood that the unordered factor
> variables caused problems, I assumed it was a warning applicable to
> someone who accidentally forgot to specify an ordinal variable. It also
> worked without problem in some simpler models, but not in my most
> complex one, so I didn't attribute it to the factor variables.
> Maybe especially the warning in parameterEstimates could be corrected or
> there should be a more obvious warning that unordered factor variables
> HAVE to be dummy-coded.
But this is not what caused the warning.
Yves.