Version 1.1.0

12th April 2013

Recent Changes

Code Download

  • Single
  • Double

MA75 Sparse over-determined system: weighted least squares

This subroutine solves weighted sparse least-squares problems. Given an m × n (m n) sparse matrix A = {aij} of rank n, an m × m diagonal matrix W of weights, and an m-vector b, the routine calculates the solution vector x that minimizes the Euclidean norm of the weighted residual vector r = W(Ax b) by solving the normal equations ATW2Ax = ATW2b.

Three forms of data storage are permitted for the input matrix: storage by columns, where row indices and column pointers describe the matrix; storage by rows, where column indices and row pointers describe the matrix; and the coordinate scheme, where both row and column indices describe the position of entries in the matrix. For the statistical analysis of the weighted least-squares problem, there are two entries: one to obtain a column and one to obtain the diagonal of the covariance matrix (ATW2A)1.