Displaying 1 result from an estimated 1 matches for "svdwrapper".
Did you mean:
podwrapper
2007 Oct 17
3
Observations on SVD linpack errors, and a workaround
...## Wrapper function for SVD. If svd(x) fails, try svd( t(x) ).
## If both fail you're out of luck in the SVD department.
## You might succeed by writing a third option based on
## eigen(). That is numerically inferior to svd when the latter
## works.
## -Art Owen, October 2007
##
svdwrapper = function( x, nu, nv, verbose=T ){
# Caution: I have not tested this much.
# It's here as an example for an R-Help discussion.
gotit = F
try( {svdx = svd(x,nu,nv); gotit=T}, silent = !verbose )
if( gotit )return(svdx)
try( {svdtx = svd(t(x),nv,nu); gotit=T}, silent = !verbose )
i...