Re: [R] CFA with lavaan or with SEM

2013-02-01 Thread Rick Bilonick
Not sure if you are aware of the OpenMx SEM package (http://openmx.psyc.virginia.edu/). It's a very full-featured structural equation modeling package. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] CFA with lavaan or with SEM

2013-01-25 Thread yrosseel
I am trying to use the cfa command in the lavaan package to run a CFA however I am unsure over a couple of issues. I have @25 dichotomous variables, 300 observations and an EFA on a training dataset suggests a 3 factor model. That is a lot of variables, and a rather small sample size (for binar

Re: [R] CFA with lavaan or with SEM

2013-01-23 Thread John Fox
> Cc: r-help@R-project.org > Subject: Re: [R] CFA with lavaan or with SEM > . . . > > model.1 <- specifyEquations() > f1 = gam11*a + gam12*b + gam13*c + gam14*d + gam15*e + gam16*g > f1 = 1* f1 > First, this is backwards: the observed variables depend on the fact

Re: [R] CFA with lavaan or with SEM

2013-01-23 Thread John Fox
n eval(expr, envir, enclos) : Could not compute QR decomposition of Hessian. Optimization probably did not converge. -- snip --- The problem seems ill-conditioned, and in any event the standard errors that you get using tetrachoric correlations won't be right (I expect you kn

Re: [R] CFA with lavaan or with SEM

2013-01-23 Thread David Purves
y grateful if you could indicate where the error in my code is please. thanks, david -Original Message- From: John Fox [mailto:j...@mcmaster.ca] Sent: 23 January 2013 14:00 To: David Purves Cc: r-help@R-project.org Subject: Re: [R] CFA with lavaan or with SEM Dear David, On Wed,

Re: [R] CFA with lavaan or with SEM

2013-01-23 Thread John Fox
Dear David, On Wed, 23 Jan 2013 11:19:09 + David Purves wrote: > Hi > > Sorry for the rather long message. > . . . > > I have tried the analysis using John Fox's SEM package / command. > > I calculate the correlation matrix with smoothing > > my.cor<-hetcor(north.dat.sub,use="pairwise

[R] CFA with lavaan or with SEM

2013-01-23 Thread David Purves
Hi Sorry for the rather long message. I am trying to use the cfa command in the lavaan package to run a CFA however I am unsure over a couple of issues. I have @25 dichotomous variables, 300 observations and an EFA on a training dataset suggests a 3 factor model. After defining the model I us