Relative Mean Difference (RMD)
rmd.RdComputes the relative mean signed deviation between `estimate` and `truth`, calculated as the mean of (`estimate - truth`) divided by the mean of `truth`, expressed as a percentage. Positive values indicate overestimation.
This is a thin wrapper around `yardstick::msd()`, with reversed sign and scaled by the mean of the true values. The default `yardstick::msd()` computes `truth - estimate`, while this function computes `estimate - truth`.
Usage
rmd(data, ...)
# S3 method for class 'data.frame'
rmd(data, truth, estimate, na_rm = TRUE, case_weights = NULL, ...)
rmd_vec(truth, estimate, na_rm = TRUE, case_weights = NULL, ...)Arguments
- data
A data frame containing the `truth` and `estimate` columns.
- ...
Additional arguments passed to lower-level functions.
- truth
The column identifier for the true values (bare or quoted).
- estimate
The column identifier for the predicted values (bare or quoted).
- na_rm
A logical value indicating whether `NA` values should be removed before computation.
- case_weights
An optional column of case weights.