We have a function called "verifyCovarianceMatrix" in the front-end that does some sanity checking on covariance matrices. What types of error checking are needed for correlation matrices? This assignment is for Ross, because we weren't using our bug report interface. "verifyCovarianceMatrix" does the following:
- matrix is square?
- matrix has NA values?
- matrix is symmetric?
- matrix is positive-definite?
#1
verifyCorrelationMatrix should (in addition to the requirements above) also ensure:
- every element on matrix diagonal is 1.0
- no matrix elements are outside of the range [-1.0, 1.0]
Log in or register to post comments
#2
The -1 to 1 condition would be covered by the positive definite test and the diagonal of 1's and therefore doesn't need to be performed as well.
Log in or register to post comments
#3
I've checked in the function to MxData and added a test to models/passing/InitializationErrorDetection.R. Thanks for the requirements gathering help!
Log in or register to post comments
#4
Log in or register to post comments
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
Log in or register to post comments