predict.pcreg {bestglm}R Documentation

Predict Method for Pcreg.

Description

Prediction for models fit using pcreg().

Usage

## S3 method for class 'pcreg'
predict(object, newdata, ...)

Arguments

object

the S3 class object produced as output from the function pcreg()

newdata

dataframe with new data and with same column names as used in the original argument to pcreg.

...

additional arguments

Details

The prediction method, predict.mvr(), which is available in the pls package is used. We take advantage of this since it avoids fussing with scaling issues since it is automatically handled for us by predict.mvr()

Value

the predicted values

Author(s)

A. I. McLeod

See Also

predict.pcreg, summary.pcreg, plot.pcreg, fitted.pcreg, residuals.pcreg

Examples

XyList <- trainTestPartition(mcdonald)
XyTr <- XyList$XyTr
XyTe <- XyList$XyTe
ans <- pcreg(XyTr, scale=TRUE)
predict(ans, newdata=XyTe)

[Package bestglm version 0.37.3 Index]