\HeaderA{sechol}{Schnabel-Eskow Choleksy Decomposition}{sechol}
\keyword{array}{sechol}
\keyword{optimize}{sechol}
\begin{Description}\relax
Perform the Schnabel-Eskow Choleksy Matrix Decomposition
\end{Description}
\begin{Usage}
\begin{verbatim}
sechol(A, tol=.Machine$double.eps, silent=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{A}] a square matrix object which can be non-singular.
\item[\code{tol}] a tolerance parameter
\item[\code{silent}] print debugging messages
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The algorithm of Schnabel and Eskow (Schnabel, R. B. and Eskow, E. 1990.
"A New Modified Cholesky Factorization." SIAM Journal of Scientific Statistical 
Computing 11, 1136-58.) improves the Gill/Murray approach of incrementing diagonal
values of a singular matrix sufficiently that Cholesky steps can be performed. 
The algorithm is based on applying the Gerschgorin Circle Theorem to reduce the 
infinity norm of the incrementing matrix. The strategy is to calculate
delta values that reduce the \emph{overall} difference between the singular matrix and
the incremented matrix.
\end{Details}
\begin{Value}
A Cholesky decomposition of the matrix C+E where C is the original non-singular
matrix and E is the minimal diagonal increment according to the Gerschgorin Circle
Theorem.  If the input matrix is non-singular, then the Cholesky decomposition of C
is returned.
\end{Value}
\begin{Author}\relax
Jeff Gill
\end{Author}
\begin{References}\relax
Schnabel, R. B. and Eskow, E. 1990.
"A New Modified Cholesky Factorization." SIAM Journal of Scientific Statistical 
Computing 11, 1136-58.

Altman, M., J. Gill and M. P. McDonald.  2003.  \emph{Numerical Issues in Statistical
Computing for the Social Scientist}.  John Wiley \& Sons.
\url{http://www.hmdc.harvard.edu/numerical_issues/}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{ginv}{ginv}}
\code{\LinkA{solve}{solve}}
\code{\LinkA{chol}{chol}}
\code{\LinkA{svd}{svd}}
\code{\LinkA{qr}{qr}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# compare with chol() on a non-singular matrix
S <- matrix(c(2,0,2.4,0,2,0,2.4,0,3),ncol=3)
chol(S)
TS<- sechol(S)
TS
t(TS) 

# an example with a singular matrix
S <- matrix(c(2,0,2.5,0,2,0,2.5,0,3),ncol=3)
TS<-sechol(S) 
TS
t(TS) 
    
# another example with a singular matrix
S <- matrix(c(2,0,10,0,2,0,10,0,3),ncol=3)
TS <- sechol(S)
TS
t(TS) 

\end{ExampleCode}
\end{Examples}

