Predict continuous values for a new dataset using a regression model
predict.regression_model_fit.Rd
This function predicts continuous values for new data using a fitted regression model.
Usage
# S3 method for regression_model_fit
predict(object, newdata, sub_indices = NULL, ...)
Arguments
- object
A fitted model object of class
regression_model_fit
.- newdata
New data to predict on, either as a matrix or a
NeuroVec
orNeuroSurfaceVector
object.- sub_indices
A vector of indices used to subset rows of `newdata` (optional).
- ...
Additional arguments to be passed to the underlying prediction function.
Value
A list containing predicted continuous values with class attributes "regression_prediction", "prediction", and "list".
Examples
# Assuming `fitted_model` is a fitted model object of class `regression_model_fit`
new_data <- iris_dataset$test_data
#> Error in eval(expr, envir, enclos): object 'iris_dataset' not found
predictions <- predict(fitted_model, new_data)
#> Error in eval(expr, envir, enclos): object 'fitted_model' not found