predict.liu {liureg}R Documentation

Predict Method for Liu Regression Model Fits

Description

Predicted values based on the Liu regression model for scalar or vector values of biasing parameter d.

Usage

## S3 method for class 'liu'
predict(object, newdata, na.action = na.pass, terms = NULL, ...)

Arguments

object

An object of class "liu".

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.

terms

The terms object used.

...

Not presently used in this implementation.

Details

The predict.liu function 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.

Value

predict.liu produces a vector of prediction or a matrix of predictions for scalar or vector values of biasing parameter d.

Note

Variables are first looked for in newdata and then are searched for in the usual way (which will include the environment of the formula used in the fit). A warning will be given if the variables found are not of the same length as those in the newdata if it was supplied.

Author(s)

Muhammad Imdad Ullah, Muhammad Aslam

See Also

Liu model fitting liu, Liu residuals residuals.liu, Liu PRESS press.liu, Testing of Liu Coefficients summary.liu

Examples

mod <- liu(y~., data = as.data.frame(Hald), d = seq(-5, 5, 0.1))
predict(mod)

predict(mod, newdata=as.data.frame(Hald[1:5, -1]))

[Package liureg version 1.1.2 Index]