0

I'm fitting a linear regression between two variables and to reduce the problem of heteroskedasticity I have log-transformed the outcome variable y.

However, this makes it difficult for me, a non statistician, to understand how I should backtransform to the MAPE (mean absolute percentage error) as it is a metric that is wanted for the comparison. I have understood that in general, back transformations should be done on the final values, and not partial calculations. But I don't know the form this transformation should take between: T(mean absolute percentage log error)= MAPE of y.

edit: had mistakenly wrote percentile instead of percentage, now changed.

  • Do you mean the Mean Absolute Percentage Error, which is what I believe is most commonly denoted as MAPE? If not, can you tell us how you would calculate a Mean Absolute Percentile Error? That said, one would typically not backtransform an error calculated on transformed predictions, but rather back-transform predictions and then calculate the error. Since you have a regression, it sounds like you have access to the predictions on the transformed scale. Are you interested in back-transforming the predictions? – Stephan Kolassa Apr 24 '23 at 09:58
  • yes, that is the MAPE. I would do the calculation as mean(abs(f(x_i)-log(y_i))/log(y_i)) for my jackknife model. I wrote mean absolute percentile log error as that seemed to more correctly match what was being calculated firstly before backtransforming. So it would be more accurate to first backtransform each prediction and compare it to each untransformed y_i, then do the MAPE? – EAAndersson Apr 24 '23 at 10:03
  • I realize you got caught on "percentile", no of course it is supposed to be "percentage" I miswrote. – EAAndersson Apr 24 '23 at 10:20
  • OK, we are talking about the same thing, that is good. I think the answer may be more complicated that you will like... First off, please take a look at this thread. I am not (necessarily) trying to convince you of the (many and highly problematic) issues with the MAPE - the main takeaway from that thread is that the conditional expectation is not the point prediction that minimizes the expected MAPE. Thus, if you want to minimize the MAPE (which I assume you want), you will need to do something more complicated, likely involving simulation. – Stephan Kolassa Apr 24 '23 at 10:23
  • I will try to write up an answer, but it may take a little while for me to find the time. – Stephan Kolassa Apr 24 '23 at 10:24
  • I see. I am in control of the final output and just need it for model comparison, to spare you the time, would it be more advisable to just compare models on their absolute prediction error (MAE) or mean squared error (MSE) instead? – EAAndersson Apr 24 '23 at 10:30
  • It depends on what point forecast you want, see Kolassa (2020). If you want the conditional expectation, use the MSE, and use a bias correction when back-transforming, see here. If you want the conditional median, use the MAE, and the back-transformation is just the exponential, see the same link. – Stephan Kolassa Apr 24 '23 at 10:50

0 Answers0