ridge | R Documentation |
ridge function estimates the coefficients for a linear model using Ridge regression.
ridge(data,y,x,lambda)
data |
name of the dataset |
y |
name of dependent variables |
x |
name of independent variable |
lambda |
a numeric value or a numeric vector to penalize the squared residual |
a matrix with the coefficients for each lambda
ridge(mtcars,"hp",c("mpg","qsec","disp"),c(0.01,0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.