ridgereg_QR-class: Ridge Regression with QR decomposition

Description Details Source Examples

Description

ridgereg_QR is a method of estimating the coefficients of multiple-regression models in scenarios where independent variables are highly correlated.

Details

ridgereg_QR differs from ridgereg in such a way that it performs QR decomposition as part of the linear system resolution.

ridgereg_QR is an RC class. Upon object instantiation, in the initialize method, it performs all calculations of quantities of interest, namely estimated coefficients and fitted dependent variable values,

Predicted values and coefficients can be obtained through the methods predict() and coef().

print() prints out the input information used in the regression and the resulting coefficients.

Source

Read more at https://en.wikipedia.org/wiki/Ridge_regression

Examples

1
2
3
4
5
6
7
data(iris)
regression_object <- ridgereg_QR(
  formula=Petal.Width ~ Sepal.Length + Sepal.Width + Petal.Length,
  data = iris, lambda=1)
regression_object$predict()
regression_object$coef()
regression_object$print()

Efaq/lab4elife599carde734 documentation built on Dec. 17, 2021, 6:23 p.m.