predict.ic.sglfit: Computes prediction

View source: R/predict.ic.sglfit.R

predict.ic.sglfitR Documentation

Computes prediction

Description

Similar to other predict methods, this functions predicts fitted values from a fitted sglfit object.

Usage

## S3 method for class 'ic.sglfit'
predict(object, newx, s = c("bic", "aic", "aicc"), type = c("response"), ...)

Arguments

object

fitted cv.sglfit model object.

newx

matrix of new values for x at which predictions are to be made. NOTE: newx must be a matrix, predict function does not accept a vector or other formats of newx.

s

choose between 'bic', 'aic', and 'aicc'.

type

type of prediction required. Only response is available. Gives predicted response for regression problems.

...

Not used. Other arguments to predict.

Details

s is the new vector at which predictions are to be made. If s is not in the lambda sequence used for fitting the model, the predict function will use linear interpolation to make predictions. The new values are interpolated using a fraction of predicted values from both left and right lambda indices.

Value

The object returned depends on type.


jstriaukas/midasml documentation built on Oct. 5, 2022, 12:18 a.m.