ridge | R Documentation |
This is a function taking a formula, a dataframe and an optional list of contrast for factor variables, and taking into account colinear (or nearly colinear) regression variables and returning coefficients.
ridge(formula, df, contrasts = NULL, lambda = 0)
formula |
an object of class "formula": describing the model to be fitted. |
df |
a dataframe that containing all the variables in the model. |
contrasts |
an optional list of contrasts for factor variables. |
lambda |
an optional penalty term for ridge regression, default is 0 |
data(iris)
form <- Sepal.Length ~ Sepal.Width
ridge(formula = form,df = iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.