assert_error_correct_avg_trend: If using 'error_correct', then check that the columns are...

View source: R/utils_asserts.R

assert_error_correct_avg_trendR Documentation

If using error_correct, then check that the columns are either in the formula_vars or average_cols, otherwise produce an error.

Description

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. If error_correct_cols is not NULL, 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.


caldwellst/augury documentation built on Oct. 10, 2024, 8:20 a.m.