Description Usage Arguments Details Value Author(s) See Also
SVD that traps errors and switches to QR when necessary
1 | svdSafe(X)
|
X |
Matrix to decompose |
This function traps errors in the svd function due to numerically zero singular values, and replaces the operation with a QR decomposition. Technically, the R component of the decomposition fails the orthogonality constraint required for the SVD decomposition, but this function exists to save bootstraps from rudely failing; since the critical component of the SVD (in this application) is the left orthogonal matrix, this is a reasonable approximation for bootstrap purposes. If there are too many svd failures (which will will be reported by the function) then it is worth looking into the design matrix.
A list as in what svd produces: U and V matrices as well as the d vector of singular values.
E. Andres Houseman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.