https://github.com/cran/ftsa
Raw File
Tip revision: 592f61af0e8cfd418ea2dfc4fb50aaa23bd972cc authored by Han Lin Shang on 03 January 2019, 07:30:06 UTC
version 5.3
Tip revision: 592f61a
smdape.R
smdape <- function(forecast, true)
{
     if (length(forecast) != length(true))
         stop("SMDAPE: the lengths of input vectors must be the same.")
     err = median(200 * abs(true - forecast) / (true + forecast))
     return(round(err, 6))
}
back to top