\stnd cov2cor?
Posted on

Forums
Hi
I'm looking for the OpenMx equivilent to the mx \stnd function. Searching the page the cov2cor() function within mxAlgebra pops up a couple of times but looks to have been discontinued(?) in the more recent releases - any similar function currently availble or implemented in the near future?
thanks
Sarah
the work arround (below) is
the work arround (below) is hanging and taking forever - any ideas on speeding this up?
mxAlgebra( expression= solve(sqrt(I*expCovMZ)) %*% expCovMZ %*% solve(sqrt(I*expCovMZ)), name="expCorMZ" )
Log in or register to post comments
In reply to the work arround (below) is by smedland
We don't perform automatic
We don't perform automatic common subexpression elimination, so the matrix inverse is computed twice. Use the following:
inverse <- mxAlgebra(solve(sqrt(I * expCovMZ)), name = "inverse")
expCorMZ <- mxAlgebra(inverse %*% expCovMZ %*% inverse, name = "expCorMZ")
Log in or register to post comments
In reply to We don't perform automatic by mspiegel
%&% there's quadratic
%&% there's quadratic multiplier to help:
mxAlgebra(solve(sqrt(I * expCovMZ)), name = "inverse")
mxAlgebra(inverse %&% expCovMZ , name = "expCorMZ")
Log in or register to post comments
Opened a ticket for cov2cor
Opened a ticket for cov2cor http://openmx.psyc.virginia.edu/issue/2010/06/mxalgebra-wishlist.
Log in or register to post comments
In reply to Opened a ticket for cov2cor by mspiegel
Yes, workshop participants
Yes, workshop participants are struggling in the absence of cov2cor. There's a need for it to be somewhat robust, e.g., if there's a zero or negative value in diagonal element a[i,i] then elements [i,] and [,i] of the result should be NA rather than throwing an error (though a warning may be appropriate).
Log in or register to post comments