Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *csantos*

Created *09/28/2009 - 17:51*

Mon, 09/28/2009 - 17:51 — csantos [1]

I'm running a factor analysis, which I have done before using EQS, with OpenMx and finding an error. The code and the output are below. I'd appreciate any diagnostics and directions!

Regards,

Carlos.

_____________

#load library

require(OpenMx)

#data

AttractivenessDataRaw <- read.table("/home/pos/carlosdenner/Desktop/logattractiveness.txt",header=TRUE)

names(AttractivenessDataRaw)

#model specification

AttractivenessFactorModel<-mxModel("Attractiveness Factor Model",

type="RAM",

mxData(

observed=AttractivenessDataRaw,

type="raw"),

manifestVars=c("pageviews","downloads","members"),

latentVars="attractiveness",

# residual variances

mxPath(from=c("pageviews","downloads","members"),

arrows=2,

free=TRUE,

values=c(1,1,1),

labels=c("e1","e2","e3")

),

# latent variance

mxPath(from="attractiveness",

arrows=2,

free=TRUE,

values=1,

labels ="varAttractiveness"

),

# factor loadings

mxPath(from="attractiveness",

to=c("pageviews","downloads","members"),

arrows=1,

free=c(FALSE,TRUE,TRUE),

values=c(1,1,1),

labels =c("l1","l2","l3")

),

# means

mxPath(from="one",

to=c("pageviews","downloads","members","attractiveness"),

arrows=1,

free=c(TRUE,TRUE,TRUE,FALSE),

values=c(1,1,1,0),

labels =c("meanpageviews","meandownloads","meanmembers",NA)

)

) # close model

AttractivenessFactorFit <- mxRun(AttractivenessFactorModel)

__________

Output:

Running Attractiveness Factor Model

Warning message:

In model 'Attractiveness Factor Model' NPSOL returned a non-zero status code 6. model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)

**Links:**

[1] http://openmx.psyc.virginia.edu/users/csantos

[2] http://openmx.psyc.virginia.edu/thread/522

[3] http://openmx.psyc.virginia.edu/thread/118

[4] http://openmx.psyc.virginia.edu/forums/opensem-forums/confirmatory-factor-analysis-and-measurement-models