hfti: Least Squares Solution using Householder Transformation

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/lsei.R

Description

Solves the least squares problem using Householder forward triangulation with column interchanges. It is an R interface to the HFTI function that is described in Lawson and Hanson (1974, 1995). Its Fortran implementation is public domain and is available at http://www.netlib.org/lawson-hanson/.

Usage

1
hfti(a, b, tol = 1e-07)

Arguments

a

Design matrix.

b

Response vector or matrix.

tol

Tolerance for determining the pseudorank.

Details

Given matrix a and vector b, hfti solves the least squares problem:

minimize || a x - b ||.

Value

b

first krank elements contains the solution

krank

psuedo-rank

rnorm

Euclidean norm of the residual vector.

Author(s)

Yong Wang <yongwang@auckland.ac.nz>

References

Lawson and Hanson (1974, 1995). Solving least squares problems. Englewood Cliffs, N.J., Prentice-Hall.

See Also

lsei, nnls.

Examples

1
2
3
a = matrix(rnorm(10*4), nrow=10)
b = a %*% c(0,1,-1,1) + rnorm(10)
hfti(a, b)

lsei documentation built on Jan. 13, 2021, 6:13 a.m.

Related to hfti in lsei...