hatr: Ridge Regression: Hat Matrix

View source: R/hatr.R

hatr.lmridgeR Documentation

Ridge Regression: Hat Matrix

Description

The hatr function computes hat matrix (see Hastie and Tibshirani, 1990).

Usage

hatr(x, ...)
## S3 method for class 'lmridge'
hatr(x, ...)

Arguments

x

An object of class "lmridge".

...

Not presently used in this implementation.

Details

Hat matrix for scalar or vector values of biasing parameter provided as argument to lmridge. It is used to compute degrees of freedom for given K, and error degree of freedom etc. The hat matrix can be computed using formula X(X'X+kI)^{-1}X' equivalently ∑((λ_j)/(λ_j+k)).

Value

returns a list of matrix for each biasing parameter K:

hatr

A list of hat matrix for each biasing parameter K

.

Author(s)

Muhammad Imdad Ullah, Muhammad Aslam

References

Cule, E. and De lorio, M. (2012). A semi-Automatic method to guide the choice of ridge parameter in ridge regression. arXiv:abs/1205.0686v1 [stat.AP].

Hastie, T. and Tibshirani, R. (1990). Generalized Additive Models. Chapman and Hall.

Imdad, M. U. Addressing Linear Regression Models with Correlated Regressors: Some Package Development in R (Doctoral Thesis, Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan), 2017.

See Also

The ridge model fitting lmridge, ridge Var-Cov matrix vcov.lmridge

Examples

mod <- lmridge(y~., as.data.frame(Hald), K = c(0, 0.1, 0.2, 0.3))
## Hat matrix for each biasing parameter
hatr(mod)

## Hat matrix for first biasing parameter i.e. K = 0.1
hatr(mod)[[2]]

lmridge documentation built on Jan. 15, 2023, 5:06 p.m.