ridge_regression: Ridge Regression

Description Usage Arguments Value Examples

View source: R/ridge_regression.R

Description

Implement a ridge regression function taking into account colinear (or nearly colinear) regression variables.

Usage

1
ridge_regression(formula, data, lambda = 0, contrasts = NULL, tol = 1e-08)

Arguments

formula

a formula that accounts for the model of interest

data

a dataframe that contains the variables of interest

lambda

ridge penalty with default value 0

contrasts

an list of contrast

tol

a tolerance to detect collinearity

Value

A list of beta estimates and the formula.

Examples

1
2
data(iris)
ridge_regression(Sepal.Length ~ ., iris, 0.01)

Zebedial/bis557 documentation built on Dec. 21, 2020, 2:16 a.m.