1

I am working on survey data and try to analyse it with SEM in R with lavaan

The data has no missing value, and there are 1723 cases.

My model has 2 factors and two ordinal endogenous variables.

And the model looks like below:

#model1
model1 <- '
  # measurement model
  F1=~ Q15+Q16+Q17
  F2=~ Q18+Q19+Q20+Q22+Q23
  # regressions
   V1~ V2+ V3+ V4
   HKER ~ V2+ V3+ V4 + V5
   F2~ Ordin1+ V5
   F1~ V5
   Ordin2~ parscor + Ordin1+ F2 + F1
  # residual correlations
    Q15 ~~ Q16+Q17
    Q16 ~~ Q17
    Q18 ~~ Q19+Q20+Q22+Q23
    Q19 ~~ Q20+Q22+Q23
    Q20 ~~ Q22+Q23
    Q22 ~~ Q23
    V1~~ V2 + V3+ V4
    V2~~ V3 + V4
    V3 ~~ V4
'

All variables, no matter exogenous or endogenous are ordinal variables.

The program shows two warnings:

  1. the optimizer (NLMINB),claimed the model converged,but not all elements of the gradient are (near) zero;, the optimizer may not have found a local solution; use check.gradient = FALSE to skip this check.
  2. trouble constructing W matrix; used generalized inverse for A11 submatrix Error in nlminb(start = start.x, objective = objective_function, gradient = GRADIENT, :

I followed the instruction in:

http://lavaan.ugent.be/tutorial/cat.html

and declare Ordin1 and Ordin2 as ordinal variables with ordered but it does not work. And standard errors for all estimates are missing.

Does anyone know what's going on here?

John Conde
  • 217,595
  • 99
  • 455
  • 496
John YE
  • 23
  • 5

0 Answers0