https://github.com/cran/ftsa
Tip revision: 40843892bfe0516f9b20b9969440ace2924d33a9 authored by Han Lin Shang on 22 February 2010, 08:04:49 UTC
version 1.5
version 1.5
Tip revision: 4084389
mape.R
`mape` <- function(forecast, true)
{
if (length(forecast) != length(true))
stop("MAPE: the lengths of input vectors must be the same.")
err = mean(100 * abs((true - forecast) / true))
return(round(err, 6))
}