https://github.com/cran/ftsa
Raw File
Tip revision: e756b408445e4c9988ad29d10bea68f8390481ed authored by Han Lin Shang on 06 January 2012, 06:14:11 UTC
version 2.8
Tip revision: e756b40
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