View source: R/predict.tidyfit.models.R
predict.tidyfit.models | R Documentation |
tidyfit.models
frameThe function generates predictions for all models in a tidyfit.models
frame and outputs a tidy frame.
## S3 method for class 'tidyfit.models'
predict(object, newdata, ..., .keep_grid_id = FALSE)
object |
|
newdata |
New values at which predictions are to made |
... |
currently not used |
.keep_grid_id |
boolean. By default the grid ID column is dropped, if there is only one unique setting per model or group. |
The function uses the 'model_object' column in a tidyfit.model
frame to return predictions using the newdata
argument for each model.
When the response variable is found in newdata
, it is automatically included as a 'truth' column.
A 'tibble'.
Johann Pfitzinger
coef.tidyfit.models
, residuals.tidyfit.models
and fitted.tidyfit.models
data <- dplyr::group_by(tidyfit::Factor_Industry_Returns, Industry)
fit <- regress(data, Return ~ ., m("lm"), .mask = "Date")
predict(fit, data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.