means vector
Posted on

The means vector is now always converted into an n x 1 matrix. The argument to mxData continues to accept an R numeric vector (in fact, I don't think the mxData function currently will accept a matrix for the means argument). But the means are now always stored as an n x 1 matrix. We had some sloppiness in the R interface where sometimes it was n x 1 and sometimes it was 1 x n. I updated the test suite in light of these changes, but I did not update the /docs. UPDATE: I modified docs/source/OpenMxTutorial.rst and some more web documentation to reflect this change http://openmx.psyc.virginia.edu/dev/changeset/760.
n*1 is the opposite of what
n*1 is the opposite of what was described in this thread
http://openmx.psyc.virginia.edu/thread/40-means-vector-mxdata-row-matrix-or-column-matrix
It's not a major deal, I guess, but 1*n is how means are always presented and the means summarize columns of data, not rows.
Log in or register to post comments
I agree with Tim Bates on
I agree with Tim Bates on this one.
Mx v1 used a 1xn
If I'm summarizing my data matrix X, I would write
apply(X, 2, mean)
and although that results in an undimensioned vector, I think of it as a 1xn.
What is the logic for nx1?
Log in or register to post comments
In reply to I agree with Tim Bates on by Steve
>
Also the back-end calculations "work" if the means vector is a n x 1 matrix. Of course they would also "work" on a 1 x n matrix, but only if the transpose operation is applied.
Log in or register to post comments
In reply to > by mspiegel
Transpose in the backend or
Transpose in the backend or transpose in the user's mind, which is less trouble overall?
Now, perhaps we should take a poll before I blithely state that the majority of user's are going to see an nx1 means matrix as being the transpose of what they intuitively expect.
Log in or register to post comments
In reply to Transpose in the backend or by Steve
hi steve and mike, Clearly
hi steve and mike,
Clearly transpose in the user's mind is more trouble for the user... As it is intended that there are several orders of magnitude more user's than programmers, and they will each write dozens of means matrices, while the program code is written once, I'd say that means it is less trouble for the code to transpose.
tim
How do you add a poll?
Log in or register to post comments
In reply to > by mspiegel
I thought part of the appeal
I thought part of the appeal of 1xn is that the column names of the means vector match the column names of raw data. I understand that vectors are typically approached as column vectors, but I'm for being consistent with usage here.
Log in or register to post comments
Based on the comments from
Based on the comments from today's developer meeting, the means vector will always be stored as a 1 x n matrix. This change will be made before the next closed beta release, OpenMx v. 0.1.3 which will happen on Monday.
Log in or register to post comments
In reply to Based on the comments from by mspiegel
As of revision 774, the means
As of revision 774, the means vector is always stored as a 1 x n matrix.
Log in or register to post comments