View source: R/predict.cv.hfr.R
predict.cv.hfr | R Documentation |
Predict values using a fitted cv.hfr
model
## S3 method for class 'cv.hfr'
predict(object, newdata = NULL, kappa = NULL, ...)
object |
Fitted 'cv.hfr' model. |
newdata |
Matrix or data.frame of new values for |
kappa |
The hyperparameter used for prediction. If empty, the optimal value is used. |
... |
additional methods passed to |
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.
A vector of predicted values.
Johann Pfitzinger
hfr
, cv.hfr
and coef
methods
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.