You are here

The F matrix in model...does not have column names

5 posts / 0 new
Last post
mjadams's picture
Offline
Joined: 10/13/2009 - 11:30
The F matrix in model...does not have column names

When I run the simple regression example with matrix specification i get

> uniRegFit <- mxRun(uniRegModel)
Running Simple Regression -- Matrix Specification
Error: The F matrix in model 'Simple Regression -- Matrix Specification' does not have column names.

I've set up some dummy data to feed into the model

x <- rnorm(40);
y <- 2* x + rnorm(length(x), sd=0.5);#
SimpleRegRaw <- data.frame(x, y)

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
hi mark, Not sure which

hi mark,
Not sure which script you are running (good to give its path or a url)

if its this demo:
system.file("demo", "SimpleRegression_MatrixRaw.R", package="OpenMx")

It runs fine and doesn't have an F matrix

      name matrix row col   Estimate  Std.Error
1    beta1      A   2   1 0.48311952 0.05485898
2     varx      S   1   1 1.10531961 0.11139436
3 residual      S   2   2 0.66520325 0.06543771
4    meanx      M   1   1 0.05415996 0.07594610
5    beta0      M   1   2 2.54776416 0.05779007
AdminJeff's picture
Offline
Joined: 07/28/2009 - 13:30
I think he meant from the

I think he meant from the documentation:

http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Regression_Matrix.html#model-specification

If that's not what you're running, can you copy and paste the exact code for us?

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
The documentation

The documentation http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Regression_Matrix.html was out of sync with the demos. This has been corrected in the subversion repository and online. If you were running a script from a different source, please let us know.

mjadams's picture
Offline
Joined: 10/13/2009 - 11:30
Thanks Tim and Jeff. Jeff is

Thanks Tim and Jeff.

Jeff is right that I meant the example code in the manual. Having a look at SimpleRegression_MatrixRaw.R I see that the F matrix requires a dimnames argument.

<pre>
 mxMatrix(
        type="Iden",  
        nrow=2, 
        ncol=2,
        name="F",
        dimnames=list(c("x","y"),c("x","y"))
    ),

(and also that the documentation has been updated)

I also see now that the dimnames in the Filter matrix are what hook up the rows and columns of these matrices to the manifest variables in the mxData object.