svdlm {smoothemplik} | R Documentation |
Least-squares regression via SVD
Description
Least-squares regression via SVD
Usage
svdlm(x, y, rel.tol = 1e-09, abs.tol = 1e-100)
Arguments
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 |
Value
A vector of coefficients.
Examples
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
[Package smoothemplik version 0.0.14 Index]