{SparseM}R Documentation

Internal slm fitting functions


Fitting functions for sparse linear model fitting.

Usage,y,method, ...)
slm.wfit(x,y,weights,...), y, ...)


x design matrix.
y vector of response observations.
method only csr is supported currently
weights an optional vector of weights to be used in the fitting process. If specified, weighted least squares is used with weights `weights' (that is, minimizing

sum w e^2

The length of weights must be the same as the number of observations. The weights must be nonnegative and it is strongly recommended that they be strictly positive, since zero weights are ambiguous.

... additional arguments.

Details and slm.wfit call to do Cholesky decomposition and then backsolve to obtain the least squares estimated coefficients. These functions can be called directly if the user is willing to specify the design matrix in matrix.csr form. This is often advantageous in large problems to reduce memory requirements.


A list of class slm consisting of:

coef estimated coefficients
chol cholesky object from fitting
residuals residuals
fitted fitted values
terms terms
call call



Roger Koenker


Koenker, R and Ng, P. (2002). SparseM: A Sparse Matrix Package for R,

See Also


[Package SparseM version 0.54 Index]