MAPE
Hi
Thanks for your great library.
I was looking at the source code of "mape" function, and I noticed that the "na.rm == TRUE" case is not handled properly (of course I could be wrong).
just one example to show its problem is to have:
predicted <- c(1, 2, 3)
observed <- c(NA, 2.5, 3.5)
in the source code and when na.rm = TRUE
:
observed <- observed[!is.na(observed)]
predicted <- predicted[!is.na(predicted)]
This will lead to an observed
vector of length 2, and predicted
vector of length 3.
And even if by chance the length are the same, there would be mismatch in the case of a time series, for instance.
I hope I was not very vague.
Thanks again