hatliu {fastliu} | R Documentation |
Hat matrix of Liu Regression
Description
For each value of the regularization parameter lambda,
hatliu
returns the hat matrix of Liu regression.
The hat matrix for Liu regression is computed using the formula
\mathbf{H}=\mathbf{X}\left(\mathbf{X}^{T}\mathbf{X}+\mathbf{I}_{p}\right)^{-1}
\left(\mathbf{X}^{T}\mathbf{X}+\lambda\mathbf{I}_{p}\right)\left(\mathbf{X}^{T}
\mathbf{X}\right)^{-1}\mathbf{X}^{T}.
Usage
hatliu(obj)
Arguments
obj |
A |
Value
The returned object is a list of matrices whose elements are
the hat matrices for the values 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)
# Hat matrix list
hatlist <- hatliu(liu.mod)
# Hat matrix for third regularization parameter
hatlist[[3]]
[Package fastliu version 1.0 Index]