Description Usage Arguments Value See Also
sparse_lm
uses sparse matrices and a iterative solver to fit linear models.
The sparse iterative solvers are from the Eigen
C++ library.
Currently, only the Conjugate Gradient algorithm has been implemented with
a diagonal preconditioner.
1 |
X |
a sparse matrix of the class |
y |
a numeric vector with response variable. |
x0 |
a numeric vector of length |
maxiter |
an integer scalar with the maximum number of iterations.
A good choice is usually |
tol |
a numeric scalar with the relative error tolerance. |
A list with the elements
coefficients |
The estimated coefficients from solver. |
itr |
A scalar denoting the number of iterations. |
error |
A scalar denoting the the relative error at the last iteration. |
fitted.values |
A vector with the fitted values. |
residuals |
The vector with the residuals. |
See
Eigen C++ library for documentation on
Eigen
library and
Conjugate Gradient
for more information about this method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.