https://github.com/cran/ftsa
Tip revision: 9875ebb2eaf427e626954f2112badab619896920 authored by Han Lin Shang on 23 December 2015, 06:53:05 UTC
version 4.6
version 4.6
Tip revision: 9875ebb
smape.R
`smape` <-
function(forecast, true)
{
if (length(forecast) != length(true))
stop("SMAPE: the lengths of input vectors must be the same.")
err = mean(200 * (true - forecast) / (true + forecast))
return(round(err, 6))
}