https://github.com/cran/ftsa
Raw File
Tip revision: 2be2cac4679ad78e8ae44283f0200a83b4a2dab9 authored by Han Lin Shang on 09 November 2010, 10:17:30 UTC
version 2.1
Tip revision: 2be2cac
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 * (true - forecast) / (true + forecast))
     return(round(err, 6))
}
back to top