LAPACK Archives

[Lapack] regression covarince estimates

Dear Ken,

I am afraid that LAPACK does not contain a routine to compute the 
covariance matrix.  You need to use LAPACK routines to put together a 
routine yourself.

If, for example, you have used DGELS to solve the least squares problem 
with one right hand side b and m >= n using the QR factorization, then 
you need to compute C given by

    C = sigma^2*(R^T R)^(-1),

where sigma is the estimated variance of the residual vector and is 
given by the sum of squares of elements (n+1) to m returned in B.  Note 
that you can use routine DPOTRI to compute (R^T R)^(-1).

Good luck and best wishes,

Sven Hammarling.

<Prev in Thread] Current Thread [Next in Thread>


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or