
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/.
hfti(a, b, tol = 1e-07)
Design matrix.
Response vector or matrix.
Tolerance for determining the pseudorank.
first krank
elements contains the solution
psuedo-rank
Euclidean norm of the residual vector.
Given matrix a
and vector b
, hfti
solves the least
squares problem:
Lawson and Hanson (1974, 1995). Solving least squares problems. Englewood Cliffs, N.J., Prentice-Hall.
# NOT RUN {
a = matrix(rnorm(10*4), nrow=10)
b = a %*% c(0,1,-1,1) + rnorm(10)
hfti(a, b)
# }
Run the code above in your browser using DataLab