diagHliu {fastliu} | R Documentation |
Diagonal Elements of the Hat Matrix
Description
For each value of the regularization parameter lambda,
diagHliu
returns the diagonal elements of the hat matrix.
Unlike the hatliu
function, only the diagonal
elements of the hat matrix are calculated, thus the
computation of diagonal elements is faster than hatliu
.
Usage
diagHliu(obj)
Arguments
obj |
A |
Value
The returned object is a matrix whose columns are the diagonal elements of the hat matrix for each value of the lambda regularization parameter.
Author(s)
Murat Genç
See Also
liureg()
, summary()
, pressliu()
, residuals()
Examples
data("Hitters")
Hitters <- na.omit(Hitters)
X <- model.matrix(Salary ~ ., Hitters)[, -1]
y <- Hitters$Salary
lam <- seq(0, 1, 0.01)
liu.mod <- liureg(X, y, lam)
diagHliu(liu.mod)
[Package fastliu version 1.0 Index]