Confusion about CFA - 1 LV, 3 MVs

I'm neither a wiz at stats nor at R, but I try to keep my head above water in both areas. I'm more comfortable with visual diagrams than with matrices, but given enough time I can usually figure out the latter.
I am running R 2.11.0 as a 32-bit application on a Windows-7 64-bit machine. My model involves one latent variable, "sexDev," and three manifest variables, "devAtt_txf", "devInt_txf", and "devBx_txf". The latter are summed results of questionnaire items (likert/ordinal and count/ratio) asking about deviant sexual attitudes, intentions, and behaviors, respectively. They have all been Box-Cox transformed because they were highly nonnormal. There is missing data in the raw data frame; I plan to use FIML later, but first I wanted to see if I could get the code to run properly without it (perhaps this is my mistake?)
My syntax is attached. Any suggestions or observations are appreciated.
I can't see my attachment
Log in or register to post comments
In reply to I can't see my attachment by dlrogers
here's a self-contained
summary(fit, SaturatedLikelihood=787)
# OpenMx attempt at CFA for F_one portion of model
# modified from example at
# http://openmx.psyc.virginia.edu/docs/OpenMx/latest/FactorAnalysis_Path.html
require(OpenMx); require(MASS)
desiredCovMatrix = matrix(
c(1, .5, .5,
.5, 1 , .5,
.5, .5 , 1) ,nrow=3, byrow=T);
xyz = mvrnorm (n=100, mu=0, Sigma= desiredCovMatrix);
xyz = data.frame(xyz); names(xyz) <- c("x", "y","z");
manifests = names(xyz);
model <- mxModel("CFA", type="RAM",
mxData(observed=xyz, type="raw"),
manifestVars=manifests,
latentVars="F_one",
mxPath(manifests, arrows=2, free=T, values=c(.1,.2,.3), labels=c("e1","e2","e3")), # residual variances
mxPath("F_one" , arrows=2, free=F, values=1, labels ="varSexDev"), # latent variance
mxPath("F_one" , to=manifests, arrows=1, free=T, values=1, labels =c("b_att","b_int","b_bx")), # loadings
mxPath("one" , to="F_one" , arrows=1, free=F, values=0), # factor mean = 1
mxPath("one" , to=manifests, arrows=1, free=T, values=1, labels =paste("mean", manifests, sep="_")) # means
)
fit <- mxRun(model)
summary(fit) # no chi-sq or RMSEA generated :(
Log in or register to post comments