optimization_lambda: optimization_lambda

Description Usage Arguments Value

Description

Optimizing the ridge parameter lambda by cross validation

Usage

1
2
3
4
5
6
7
optimization_lambda(
  form,
  dat,
  folds = 10,
  lambdas = seq(0, 1, 0.1),
  contrasts = NULL
)

Arguments

form

A formula with the format of "Y ~ .".

dat

A dataframe.

folds

The number of folds to cross validate

lambdas

A list of the ridge penalty term lambda.

contrasts

A list of contrasts.

Value

The ridge regression parameter lambda that minimizes mse.


Z1chenZhao/bis557 documentation built on Dec. 21, 2020, 10:03 p.m.