https://github.com/cran/ftsa
Raw File
Tip revision: 77c242dfb5c0095ef1c2795adcaa98ebe4e95b82 authored by Han Lin Shang on 12 March 2015, 08:20:53 UTC
version 4.2
Tip revision: 77c242d
mdape.R
`mdape` <- function(forecast, true)
{
     if (length(forecast) != length(true))
         stop("MDAPE: the lengths of input vectors must be the same.")
     err = median(100 * abs((true - forecast) / true))
     return(round(err, 4))
}
back to top