lmridge (version 1.2.2)

predict.lmridge: Predict method for Linear Ridge Model Fits

Description

Predicted values based on linear ridge regression model for scalar or vector values of biasing parameter \(K\).

Usage

# S3 method for lmridge
predict(object, newdata, na.action=na.pass, ...)

Value

predict.lmridge produces a vector of predictions or a matrix of predictions for scalar or vector values of biasing parameter.

Arguments

object

An object of class "lmridge".

newdata

An optional data frame in which to look for variables with which to predict.

na.action

Function determine what should be done with missing values in newdata. The default is to predict NA.

...

Not presently used in this implementation.

Author

Muhammad Imdad Ullah, Muhammad Aslam

Details

The predict.lmridge function produces predicted values, obtained by evaluating the regression function in the frame newdata which defaults to model.frame (object). If newdata is omitted the predictions are based on the data used for the fit. In that case how cases with missing values in the original fit are handled is determined by the na.action argument of that fit. If na.action = na.omit omitted cases will not appear in the predictions, whereas if na.action = na.exclude they will appear (in predictions), with value NA.

References

Cule, E. and De lorio, M. (2012). A semi-Automatic method to guide the choice of ridge parameter in ridge regression. arXiv:1205.0686v1 [stat.AP].

Hoerl, A. E., Kennard, R. W., and Baldwin, K. F. (1975). Ridge Regression: Some Simulation. Communication in Statistics, 4, 105-123. tools:::Rd_expr_doi("10.1080/03610927508827232").

Hoerl, A. E. and Kennard, R. W., (1970). Ridge Regression: Biased Estimation of Nonorthogonal Problems. Technometrics, 12, 55-67. tools:::Rd_expr_doi("10.1080/00401706.1970.10488634").

Imdad, M. U. Addressing Linear Regression Models with Correlated Regressors: Some Package Development in R (Doctoral Thesis, Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan), 2017.

See Also

The ridge model fitting lmridge, ridge residuals residuals, ridge PRESS press.lmridge

Examples

Run this code
mod <- lmridge(y~., as.data.frame(Hald), K = seq(0, 0.2, 0.05))
predict(mod)
predict(mod, newdata = as.data.frame(Hald[1:5, -1]))

Run the code above in your browser using DataLab