svdlm | R Documentation |
Least-squares regression via SVD
svdlm(x, y, rel.tol = 1e-09, abs.tol = 1e-100)
x |
Model matrix. |
y |
Response vector. |
rel.tol |
Relative zero tolerance for generalised inverse via SVD. |
abs.tol |
Absolute zero tolerance for generalised inverse via SVD. Newton steps for many empirical likelihoods are of least-squares type.
Denote The tolerances are used to check the closeness of singular values to zero. The values of the
singular-value vector |
A vector of coefficients.
b.svd <- svdlm(x = cbind(1, as.matrix(mtcars[, -1])), y = mtcars[, 1])
b.lm <- coef(lm(mpg ~ ., data = mtcars))
b.lm - b.svd # Negligible differences
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.