https://github.com/cran/ftsa
Raw File
Tip revision: bdacd962e07983b325d3672c4048f4337223e4de authored by Han Lin Shang on 09 December 2010, 00:00:00 UTC
version 2.4
Tip revision: bdacd96
mpe.R
`mpe` <- function(forecast, true)
{
     if (length(forecast) != length(true))
         stop("MPE: the lengths of input vectors must be the same.")
     err = mean(100 * ((true - forecast) / true))
     return(round(err, 6))
}

back to top