https://github.com/cran/ftsa
Raw File
Tip revision: 3f1e499ee5781c8bb48a137218bd7b9d01642fae authored by Han Lin Shang on 14 September 2011, 06:20:57 UTC
version 2.7
Tip revision: 3f1e499
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))
}

back to top