I'm trying to fit a very simple model using both the covariance model and the means model. I always get an error message concerning dimnames whether I specify the model via paths or using matrices. If I use matrices, it complains there are no dimnames for the F matrix - yet if I add dimnames for the F matrix it still complains.
All I want to be able to do is add a means model to the following OpenMx script that only has a covariance model:
> one <- mxModel("me",
+ type="RAM",
+ manifestVars = manifests,
+ latentVars = latents,
+ mxPath(from=latents,to=manifests,values=c(1,1,1),free=c(FALSE,TRUE,TRUE)),
+ mxPath(from=manifests,arrows=2,values=0.5,
+ free=TRUE,lbound=0),
+ mxPath(from=latents,arrows=2,values=0.5,free=TRUE,lbound=0),
+ mxAlgebra(sqrt(S),name="SD"),
+ mxData(observed=cov(OC),type="cov",numObs=42)
+ )
> summary(results <- mxRun(one))
Running me
uoaqtot uoeqtor aceqtot
Min. :1.372 Min. :1.366 Min. :1.441
1st Qu.:1.510 1st Qu.:1.369 1st Qu.:1.544
Median :1.648 Median :1.372 Median :1.648
Mean :1.619 Mean :1.393 Mean :2.146
3rd Qu.:1.742 3rd Qu.:1.407 3rd Qu.:2.498
Max. :1.836 Max. :1.441 Max. :3.349
name matrix row col Estimate Std.Error
1 A uoeqtor mu 0.8747084 0.07178385
2 A aceqtot mu 1.0500758 0.12941151
3 S uoaqtot uoaqtot 0.2671579 0.10559444
4 S uoeqtor uoeqtor 0.1660068 0.07742470
5 S aceqtot aceqtot 1.6189621 0.27089039
6 S mu mu 1.5689936 0.29003449
Observed statistics: 6
Estimated parameters: 6
Degrees of freedom: 0
-2 log likelihood: 126.5119
Saturated -2 log likelihood: 126.5119
Chi-Square: 9.023893e-12
p: 0
AIC (Mx): 9.023893e-12
BIC (Mx): 4.511946e-12
adjusted BIC:
RMSEA: Inf
Any insights would be greatly appreciated.