glmnet_ridge_lambda_best: choose the best lambda in ridge regression (standard)

Description Usage Arguments Value Examples

View source: R/glmnet_ridge_lambda_best.R

Description

This function is used to select the optimal lambda in ridge regression by function cv.glmnet in the glmnet package.It's used to check whether the self-defined method works.

Usage

1

Arguments

formula

a symbolic description of the model to be fitted.

data

a dataframe containing the variables in the model.

Value

the best lambda in ridge regression given by the function cv.glmnet.

Examples

1
glmnet_ridge_lambda_best(Sepal.Width~.,iris)

Jiachen1027/bis557 documentation built on Oct. 30, 2019, 7:41 p.m.