View source: R/error_correct.R
error_correct_fn | R Documentation |
Use mean error to correct predictions
error_correct_fn(
df,
response,
group_col,
sort_col,
sort_descending,
pred_col,
pred_upper_col,
pred_lower_col,
test_col,
error_correct,
error_correct_cols,
shift_trend
)
df |
Data frame of model data. |
response |
Column name of response variable. |
group_col |
Column name(s) of group(s) to use in |
sort_col |
Column name(s) to use to |
sort_descending |
Logical value on whether the sorted values from |
pred_col |
Column name to store predicted value. |
pred_upper_col |
Column name to store upper bound of confidence interval
generated by the |
pred_lower_col |
Column name to store lower bound of confidence interval
generated by the |
test_col |
Name of logical column specifying which response values to remove
for testing the model's predictive accuracy. If |
error_correct |
Logical value indicating whether or not whether mean error
should be used to adjust predicted values. If |
error_correct_cols |
Column names of data frame to group by when applying error correction to the predicted values. |
shift_trend |
Logical value specifying whether or not to shift predictions
so that the trend matches up to the last observation. If |
Depending on the value passed to ret
, either a data frame with
predicted data, a vector of errors from model_error()
, a fitted model, or a list with all 3.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.