I am attempting to run a Monte Carlo simulation of a CFA with 9 indicators and 3 factors (syntax below). I based my syntax on example 5.1 syntax in the user guide, but mine is not running correctly and I cannot for the life of me figure out why. I have tried adding/taking away indicators, switching up factor loadings, etc. The errors always say that some matrix is non-positive definite, and that number of iterations for convergence have been exceeded (even when set to 10,000).
Can someone who is more savvy help me out?? Ideally, I'd like to add method factors and correlated factors to this but I'm not daring to try until I get the most basic model to run.
title: Monte Carlo - CFA with N = 300 and .35 loadings
montecarlo: names = y1-y13; nobs = 300; nreps = 100; model montecarlo: f1 by y1@1 y2-y7*.35; f2 by y8@1 y9-y10*.35; f3 by y11@1 y12-y13*.35; f4 by y1@1 y2-y9*.35; f5 by y10@1 y11-y13*.35; f1 with f2*.3; f1 with f3*.3; f2 with f3*.3; f5 with f4@0; f5 with f3@0; f5 with f2@0; f5 with f1@0; f4 with f3@0; f4 with f2@0; f4 with f1@0; y1-y13*1; f1@1; f2@1; f3@1; f4@1; f5@1; model: [repeated for model statement, removed for length] output: tech9;