If using error_correct
, then check that the columns are either in the
formula_vars
or average_cols
, otherwise produce an error.
Source: R/utils_asserts.R
assert_error_correct_avg_trend.Rd
If using error_correct
, then check that the columns are either in the
formula_vars
or average_cols
, otherwise produce an error.
Usage
assert_error_correct_avg_trend(
formula_vars,
average_cols,
error_correct,
error_correct_cols
)
Arguments
- formula_vars
Variables included in the model formula, generated by
all.vars(formula)
.- average_cols
Column name(s) of column(s) for use in grouping data for averaging, such as regions. If missing, uses global average of the data for infilling.
- error_correct
Logical value indicating whether or not whether mean error should be used to adjust predicted values. If
TRUE
, the mean error between observed and predicted data points will be used to adjust predictions. Iferror_correct_cols
is notNULL
, mean error will be used within those groups instead of overall mean error.- error_correct_cols
Column names of data frame to group by when applying error correction to the predicted values.