I'm trying to run an SEM, but I keep getting the following error message. In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge.
I have 4 latent variables (plant, AMF, abiotic, and soilAgg) with 2 or 4 indicator variables for each latent variable.My model is specified as: > mod.AL.5 <- specify.model() 1: plant -> tnCSG, plantCSG, .6 2: plant -> tnDIV, plantDIV, NA 3: plant -> tnFRL, plantFRL, NA 4: plant -> tnCRL, plantCRL, NA 5: AMF -> tnHL, AMFHL, .6 6: AMF -> tnHRL, AMFHRL, NA 7: abiotic -> tnHYDRO, abioticHYDRO, .6 8: abiotic -> tnPS, abioticPS, NA 9: abiotic -> tnNaPi, abioticNaPi, NA 10: abiotic -> tnNaPo, abioticNaPo, NA 11: soilAgg -> tnWSA2.4, soilAgg2.4, .6 12: soilAgg -> tnWSA1.2, soilAgg1.2, NA 13: soilAgg -> tnWSA0.5.1, soilAgg0.5.1, NA 14: soilAgg -> tnWSA212.500, soilAgg212.500, NA 15: plant <-> AMF, plantAMF, NA 16: abiotic <-> plant, abioticPlant, NA 17: AMF <-> abiotic, AMFabiotic, NA 18: plant -> soilAgg, plantAgg, NA 19: AMF -> soilAgg, AMFagg, NA 20: abiotic -> soilAgg, abioticAgg, NA 21: tnCSG <-> tnCSG, CSGerror, NA 22: tnDIV <-> tnDIV, DIVerror, NA 23: tnFRL <-> tnFRL, FRLerror, NA 24: tnCRL <-> tnCRL, CRLerror, NA 25: tnHL <-> tnHL, HLerror, NA 26: tnHRL <-> tnHRL, HRLerror, NA 27: tnHYDRO <-> tnHYDRO, hydroError, NA 28: tnPS <-> tnPS, PSerror, NA 29: tnNaPi <-> tnNaPi, NaPiError, NA 30: tnNaPo <-> tnNaPo, NaPoError, NA 31: tnWSA2.4 <-> tnWSA2.4, WSA2.4Error, NA 32: tnWSA1.2 <-> tnWSA1.2, WSA1.2Error, NA 33: tnWSA0.5.1 <-> tnWSA0.5.1, WSA0.5.1Error, NA 34: tnWSA212.500 <-> tnWSA212.500, WSA212.500Error, NA 35: plant <-> plant, NA, 1 36: AMF <-> AMF, NA, 1 37: abiotic <-> abiotic, NA, 1 38: soilAgg <-> soilAgg, NA, 1 39: and here's the sem function I used. > sem.AL.5 <- sem(mod.AL.5, ALcor, N=200) I've been through the examples in the SEM documentation, and the Wheaton model (which I can run) is similar to mine. I found similar error messages in the help archives, so I tried setting the error of the latent variables to 1, and suggesting start values for one of the indicator variables associated with each latent variable, but I still get the same error message. Does anyone have any idea how to take care of this? Just from looking at the correlation matrix (see below), the correlations are generally low. Would that be enough to prevent convergence? If I use the covariance matrix instead of the correlation matrix and set maxiter=2000 I get output, but I still get an error message saying the maximum number of iterations was exceeded and that optimization may not have converged. Thanks in advance for your help, Kathryn > ALcor tnCSG tnDIV tnFRL tnCRL tnHL tnCSG 1.00000000 0.598589240 -0.09766885 -0.078573691 0.47290972 tnDIV 0.59858924 1.000000000 0.04533969 -0.001910876 0.26677920 tnFRL -0.09766885 0.045339692 1.00000000 0.853052765 0.23436161 tnCRL -0.07857369 -0.001910876 0.85305276 1.000000000 0.33387717 tnHL 0.47290972 0.266779205 0.23436161 0.333877174 1.00000000 tnHRL 0.30636700 0.179672277 -0.81941675 -0.729226499 -0.13339807 tnHYDRO -0.11891511 -0.025275225 0.35393818 0.267298106 0.25214845 tnNaPi -0.41824708 -0.736959179 0.14473067 0.249238485 -0.02147190 tnNaPo 0.10707415 -0.360450067 0.03880794 0.163099408 0.33992466 tnPS 0.27726142 0.510986276 0.07216890 0.083311567 0.40554097 tnWSA2.4 0.16649209 -0.057519363 0.04794688 -0.072041701 0.05880872 tnWSA1.2 -0.10414538 -0.205197511 -0.06031893 0.159312072 0.18604414 tnWSA0.5.1 -0.17479942 0.106380104 0.02144471 0.054702063 -0.16966552 tnWSA212.500 -0.11611759 0.169063525 -0.09266492 -0.084036868 -0.17802964 tnHRL tnHYDRO tnNaPi tnNaPo tnPS tnCSG 0.30636700 -0.11891511 -0.41824708 0.107074151 0.27726142 tnDIV 0.17967228 -0.02527523 -0.73695918 -0.360450067 0.51098628 tnFRL -0.81941675 0.35393818 0.14473067 0.038807940 0.07216890 tnCRL -0.72922650 0.26729811 0.24923848 0.163099408 0.08331157 tnHL -0.13339807 0.25214845 -0.02147190 0.339924658 0.40554097 tnHRL 1.00000000 -0.16550993 -0.16140371 -0.055624417 0.02845425 tnHYDRO -0.16550993 1.00000000 0.17276186 0.256247649 0.25005594 tnNaPi -0.16140371 0.17276186 1.00000000 0.533883552 -0.40849332 tnNaPo -0.05562442 0.25624765 0.53388355 1.000000000 0.13696445 tnPS 0.02845425 0.25005594 -0.40849332 0.136964451 1.00000000 tnWSA2.4 -0.12351999 -0.16219698 -0.16570385 -0.002183605 -0.27257633 tnWSA1.2 0.07826866 0.02910394 0.44637209 0.285468889 -0.05344273 tnWSA0.5.1 0.09160446 0.17053215 0.10932858 -0.107123596 0.21283469 tnWSA212.500 0.16099662 0.14943925 -0.04625665 -0.182579243 0.27829650 tnWSA2.4 tnWSA1.2 tnWSA0.5.1 tnWSA212.500 tnCSG 0.166492091 -0.10414538 -0.17479942 -0.11611759 tnDIV -0.057519363 -0.20519751 0.10638010 0.16906352 tnFRL 0.047946878 -0.06031893 0.02144471 -0.09266492 tnCRL -0.072041701 0.15931207 0.05470206 -0.08403687 tnHL 0.058808717 0.18604414 -0.16966552 -0.17802964 tnHRL -0.123519990 0.07826866 0.09160446 0.16099662 tnHYDRO -0.162196983 0.02910394 0.17053215 0.14943925 tnNaPi -0.165703851 0.44637209 0.10932858 -0.04625665 tnNaPo -0.002183605 0.28546889 -0.10712360 -0.18257924 tnPS -0.272576334 -0.05344273 0.21283469 0.27829650 tnWSA2.4 1.000000000 -0.51857209 -0.91353074 -0.83749935 tnWSA1.2 -0.518572095 1.00000000 0.24990500 0.03657620 tnWSA0.5.1 -0.913530744 0.24990500 1.00000000 0.87048428 tnWSA212.500 -0.837499354 0.03657620 0.87048428 1.00000000 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.