0
votes

I have the Original forecast data from a company (12 observations). Next to that I have the REAL 12 observations. I just want to calculate the accuracy of the companies current method with the real data and let them know what the MSE, MAPE, MAD, MAE etc is. So I don't have to calculate the forecast myself, but just using these 2 datasets. I can't get my head around how to use the accuracy() function in this case. I can convert the forecast dataset to a time series value, but I still keep getting errors.

Anyone knows how to help me out?

> Forecast_data
1    8237
2    13438
3    10026
4    9651
5    11043
6    8500
7    10126
8    11560
9    11175
10   9103
11   14456
12   10308

> Real data
1   16507
2   14637
3   15210
4   17818
5   17606
6   13396
7   11603
8   11094
9   14087
10  14304
11  17887
12  14116
1
What programming language are we talking about? - Capricorn
Sorry, I'm talking about RStudio. - Ilse

1 Answers

0
votes

Look at the first "date" (1) for the moment. The actual/observed value is a[1]=16507, and the forecast/estimate is f[1]=8237.

So the error/deviation is e[1]=f[1]-a[1]=8237-16507=-8270 (you underestimate) and in percentage p[1]=e[1]/a [1]=-8270/16507=-.501=-50.1% (you underestimate by 50%).

Do this for all the dates and you'll get a column of error in value e[i] and in percentage p[i].

  • The MSE (Mean Squared Error) is the average of e[i]^2.
  • The MAD (Mean Absolute Derivation) is the average of abs(e[i]).
  • The MAE (Mean Absolute Error) is the average of abs(e[i]) (the same).
  • The MASP (Mean Absolute Percent Error) is the average of abs(p[i]).