predict.cv.hfr: Model predictions

View source: R/predict.cv.hfr.R

predict.cv.hfrR Documentation

Model predictions

Description

Predict values using a fitted cv.hfr model

Usage

## S3 method for class 'cv.hfr'
predict(object, newdata = NULL, kappa = NULL, ...)

Arguments

object

Fitted 'cv.hfr' model.

newdata

Matrix or data.frame of new values for x at which predictions are to be made.

kappa

The hyperparameter used for prediction. If empty, the optimal value is used.

...

additional methods passed to predict.

Details

Predictions are made by multiplying the newdata object with the estimated coefficients. The chosen hyperparameter value to use for predictions can be passed to the kappa argument.

Value

A vector of predicted values.

Author(s)

Johann Pfitzinger

See Also

hfr, cv.hfr and coef methods

Examples

x = matrix(rnorm(100 * 20), 100, 20)
y = rnorm(100)
fit = cv.hfr(x, y, kappa = seq(0, 1, by = 0.1))
predict(fit, kappa = 0.1)


hfr documentation built on Jan. 22, 2023, 1:46 a.m.

Related to predict.cv.hfr in hfr...