Description Details Fields Methods References Examples
This function creates a class ridgereg
object which does ridge
regression upon a specified formula and data.frame and parameter lambda.
Ridge regression is performed by QR decompsition. Plots are handled by
packages ggplot2
, grid
and gridExtra
.
This RC class generator can create a ridgereg
object from any formula
as long as the response are not factors. The QR decomposition calculations
are all done using matrices. The printouts are simple paste
and
writeLines
calls for the most part, and are not objects. Every method
returns something relevant.
formula
A formula taken as input, upon which linear regression is performed.
data
A data.frame which has names to which the names in the formula refer.
dataname
A character string containing the name of the data.
lambda
A numeric scalar which specifies the hyperparameter lambda
coefficients
A single column matrix consisting of the calculated regression coefficients of the linear model.
predicted
A vector containing the linearly predicted response.
coef()
Returns a named vector of the regression coefficients in the linear model.
initialize(formula, data, lambda)
From inputs formula and data, generates all the other fields upon object initialization.
predict(newframe = NULL)
Returns the predicted values of the linear model. Can also take a new data.frame with covariate values and make new prediction based on them.
print()
Gives a printout of the call as well as the calculated regression coefficients.
http://en.wikipedia.org/wiki/Tikhonov_regularization
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.