Hello. I started using the sem package in R and after a lot of searching and trying things I am still having difficulty. I get the following error message when I use the sem() function:
Warning 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 started with a simple example using the specify.model() function, but it is really straight forward. I uploaded my specify.model script and my data covariance matrix here too so I wouldn't clutter this email with the entire model (20 observed variables, 5 factors). Could this error message be from the data itself and not from my path model? I have my observed variables X and my unobserved variables F. I have ONLY exogenous latent variables (i.e. they never appear on the right side of the single head arrow ->). I include all possible factor covariances FjFk, and the only constraints I've made was to restrict the Factor variances to 1. My model follows in this basic format (as you can see from my uploaded file): # Factors (where I specify which observed variables load on to which factors) # I have only exogenous latent variables F.i -> X.j, lamj.i, NA . . . # Observed variable variances X.j <-> X.j, ej, NA . . . # Factor variances (I fixed all factor variances to 1) F.i <-> F.i, NA, 1 . . . # Factor covariances (I represent all factor covariances, i.e. the upper or lower triangle of a covariance matrix) F.i <-> F.k, FiFk, NA . . . Did I do something wrong here? Here are my uploaded files: CFA script: http://r.789695.n4.nabble.com/file/n4016569/CFA_script.txt CFA_script.txt Covariance matrix: http://r.789695.n4.nabble.com/file/n4016569/covariance_matrix.RData covariance_matrix.RData Thank you so much for any and all of your help. Lisa -- View this message in context: http://r.789695.n4.nabble.com/Help-with-SEM-package-Error-message-tp4016569p4016569.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.