# Mahalanobis Distance - Forecast Error

Hey,

I wanna rank 2 forecaster

Forecaster 1 has following Forecasterrors: (-0.2, -0.1, 0.077, -1.9, -3.5) = (Growth, Inflation, Unemp, Export, Import)
Forecaster 2 has: (-1.3, -0.6, 0.067, -3.4, -3.6)

First, it looks like forecaster 1 make a better job. Now I wanna the distance for all variables together. Popular is the city Block and euclidean distance. But I wanna take the covariance matrix into account. So I have to use Mahalanobis distance. For this, I calculate the Covarianz Matrix for the last 20 Years. So the Growth rate, Inflation rate ... for the last 20 Years.

It looks like this
Growth Inflation Unemp Exp Imp
Growth 2.7466366 0.4399024 -0.3701714 8.0682432 6.7116742
Inflation 0.4399024 0.9655856 -0.2505466 1.3235961 0.4141216
Unemp -0.3701714 -0.2505466 0.7901290 0.4417191 -0.1928676
Exp 8.0682432 1.3235961 0.4417191 33.2797297 25.4728003
Imp 6.7116742 0.4141216 -0.1928676 25.4728003 22.6503453

So now I use Mahalanobis Distance in R
Mahalanobis(x, center=0, cov)

Center is 0 because optimal forecast-error is 0

I got for forecaster 1: 2.49782
forecaster 2: 1.654436

Forecaster 2 has a smaller distance than forecaster 1. I don't know why?
That would mean he is better than 1.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.