Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lsq

Least Squares Problems in Surveying


Description

One of the four matrices from the least-squares solution of problems in surveying that were used by Michael Saunders and Chris Paige in the testing of LSQR

Usage

data(lsq)

Format

A list of class matrix.csc.hb or matrix.ssc.hb depending on how the coefficient matrix is stored with the following components:

  • ra ra component of the csc or ssc format of the coefficient matrix, X.

  • ja ja component of the csc or ssc format of the coefficient matrix, X.

  • ia ia component of the csc or ssc format of the coefficient matrix, X.

  • rhs.ra ra component of the right-hand-side, y, if stored in csc or ssc format; right-hand-side stored in dense vector or matrix otherwise.

  • rhs.ja ja component of the right-hand-side, y, if stored in csc or ssc format; a null vector otherwise.

  • rhs.ia ia component of the right-hand-side, y, if stored in csc or ssc format; a null vector otherwise.

  • xexactvector of the exact solutions, b, if they exist; a null vector o therwise.

  • guessvector of the initial guess of the solutions if they exist; a null vector otherwise.

  • dimdimenson of the coefficient matrix, X.

  • rhs.dimdimenson of the right-hand-side, y.

  • rhs.modestorage mode of the right-hand-side; can be full storage or same format as the coefficient matrix.

References

Koenker, R and Ng, P. (2002). SparseM: A Sparse Matrix Package for R,
http://www.econ.uiuc.edu/~roger/research/home.html

See Also

read.matrix.hb

Examples

data(lsq)
class(lsq) # -> [1] "matrix.csc.hb"
model.matrix(lsq)->X
class(X) # -> "matrix.csr"
dim(X) # -> [1] 1850  712
y <- model.response(lsq) # extract the rhs
length(y) # [1] 1850

SparseM

Sparse Linear Algebra

v1.81
GPL (>= 2)
Authors
Roger Koenker [cre, aut], Pin Tian Ng [ctb] (Contributions to Sparse QR code), Yousef Saad [ctb] (author of sparskit2), Ben Shaby [ctb] (author of chol2csr)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.