ridge_regression: Ridge Regression Considering Collinearity

Description Usage Arguments Value Examples

View source: R/ridge-regression.R

Description

This is a ridge regression function taking into account collinear or nearly collinear regression variables.

Usage

1
ridge_regression(form, data, lambda)

Arguments

form

a formula with the legal format.

data

a dataframe provided by the user.

lambda

a penalty parameter specified by the user.

Value

a list including the coefficient estimates.

Examples

1
2
3
data(iris)
fit <- ridge_regression(Sepal.Length ~ ., iris)
fit$coefficients

BillyTian/bis557 documentation built on Dec. 19, 2020, 7:30 a.m.