https://github.com/cran/ftsa
Raw File
Tip revision: dcfe93af93fb6e2561a282f315e5a776c1fac668 authored by Han Lin Shang on 19 November 2010, 13:26:02 UTC
version 2.2
Tip revision: dcfe93a
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