ridge: A ridge regression function

Description Usage Arguments Value Examples

View source: R/ridge_regression.R

Description

A ridge regression that takes into account colinear (or nearly colinear) regression variables

Usage

1
ridge(X, Y, lambda)

Arguments

X

The predictors of the ridge regression model

Y

The response variable of the ridge regression model

lambda

The penalizing parameter

Value

The estimated coefficients for ridge regression and the penalizing parameter lambda

Examples

1
2
3
X = matrix(c(rep(1, 10), seq(2,20,2)+rnorm(10)), ncol=2)
y = c(seq(10,100,10)+rnorm(10))
ridge(X, y, lambda=0.01)

wuyinfeistella/bis557 documentation built on Jan. 1, 2021, 12:52 p.m.