powered by
ridge function estimates the coefficients for a linear model using Ridge regression.
ridge(data,y,x,lambda)
a matrix with the coefficients for each lambda
name of the dataset
name of dependent variables
name of independent variable
a numeric value or a numeric vector to penalize the squared residual
ridge(mtcars,"hp",c("mpg","qsec","disp"),c(0.01,0.1))
Run the code above in your browser using DataLab