https://github.com/cran/ftsa
Raw File
Tip revision: 7621951a183186ccd8706e35121ccdc4dbfddd1a authored by Shang H on 10 December 2014, 07:56:05 UTC
version 4.1
Tip revision: 7621951
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