ridgereg-class: Ridge Regression

Description Details Source Examples

Description

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

Details

ridgereg 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(
  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.