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

By *Simo*

Created *09/05/2010 - 09:36*

Sun, 09/05/2010 - 09:36 — Simo [1]

Hi there,

I am new to OpenMx and trying to fit a factor model. The main part of the script used is shown below:

> manifests <-names(hetcor_T)

> latents <-c("F1","F2","F3","F4")

> twofactorModel<-mxModel(name = "Four Factor Model Path Specification",type="RAM",manifestVars = manifests, latentVars = manifests,

+ mxData(observed=cov(hetcor_T),type="cov",numObs=709),

+ # residual variances

+ mxPath(from= manifests, arrows=2), # latent variances and covariance

+ mxPath(from= latents, arrows=2), # factor loadings for business performance measure variables

+ mxPath(

+ from=c("F1"),

+ to=c("a6e","a6f","a6g","a6h"),

+ arrows=1,

+ all =TRUE,

+ free = TRUE,

+ values=c(1),

+ labels=c("d1","d2","d3","d4")

+ ), #factor loadings for the external environmental factor variables

+ mxPath(

+ from=c("F2"),

+ to=c("a9aa","a9ab","a9ac","a9ad"),

+ arrows=1,

+ free= TRUE,

+ all = TRUE,

+ values=c(1),

+ labels=c("d5","d6","d7","d8")

+ ), #factor loadings for the competitive strategies variables

+ mxPath(

+ from=c("F3"),

+ to=c("a5aa","a5ab","a5ac","a5ad"),

+ arrows=1,

+ free=TRUE,

+ all = TRUE,

+ values=c(1),

+ labels=c("dl5","dl6","d17","d18")

+ ), #factor loadings for the manufacturing strategies variables

+ mxPath(

+ from=c("F4"),

+ to=c("b4a","b4b","b4c","b4d"),

+ arrows=1,

+ free=TRUE,

+ all = TRUE,

+ values=c(1),

+ labels=c("s26","s27","d28","d29")

+ )

+

However when I run this script, I get an error message which reads:

"Error: The following variables cannot be both latent and manifest: 'a6e', 'a6f', 'a6g', 'a6h', 'a5aa', 'a5ab', 'a5ac', 'a5ad', 'b4a', 'b4b', 'b4c', 'b4d', 'a9aa', 'a9ab', 'a9ac', 'a9ad' "

I do not understand where I have treated these as latent variables rather than as manifests.

Any help would be greatly appreciated.

Thanks

Simo

**Links:**

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

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

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

[4] http://openmx.psyc.virginia.edu/forums/openmx-help/openmx-structural-equation-modeling