# MdRAE - Median Relative Absolute Error

Calculates the median relative absolute error (MdRAE) between the forecast and the eventual outcomes.

## Syntax

MdRAE(X, F, M)

X
is the eventual outcome time series sample data (a one-dimensional array of cells (e.g., row or column).
F
is the forecast time series data (a one-dimensional array of cells (e.g., row or column).
M
is the seasonal period in X. For non-seasonal time series, set M = 1 (default), or leave it blank.

## Remarks

1. The time series is homogeneous or equally spaced.
2. The time series X and F must be of identical size
3. The time series X or F may include observations with missing values (e.g., #N/A or blank).
4. Observations with missing values in Y or F are excluded from the MdRAE calculation.
5. The relative absolute error for a given observation is defined as follows: $$r_t=\left | \frac{y_t - f_t }{ y_t - f_t^*} \right |$$ Where:
• $\{y_t\}$ is the actual outcome value at time $t$.
• $\{f_t\}$ is the forecast value at time $t$.
• $\{f_i^*\}$ is the forecast value of the benchmark model at time $t$.
6. NumXL uses the naïve forecasting model as a benchmark. The forecast value of the benchmark is defined as follows: $$f_t^*={\left\{\begin{matrix} y_{t-1} \\ y_{t-M} \end{matrix}\right. \begin{matrix} \mathrm{Non-Seasonal}\\ \mathrm{Seasonal} \end{matrix}}$$
7. The median relative absolute error is found by ordering the RAE (relative absolute error) from the smallest to the largest, and using their middle value (or the average of the middle two values if N is an even number) as the median: $$\mathrm{MdRAE}=\mathrm{median}(r_1,r_2,\cdots,r_N )$$
8. MdRAE is more resilient to outliers, unlike MRAE and GMRAE.
9. The MdRAE function is available starting with version 1.65 HAMMOCK.