swh:1:snp:3a44eb759780145deea094ac2a25c5049546a085
Tip revision: 9120e042a4e1ace638f4af6dae1ed85da1e97d81 authored by Han Lin Shang on 24 October 2012, 06:39:13 UTC
version 3.6
version 3.6
Tip revision: 9120e04
mdrae.R
mdrae = function(forecast, forecastbench, true)
{
if (length(forecast) != length(true))
stop("MdRAE: the lengths of input vectors must be the same.")
ferror = (true - forecast)
ferrorbench = (true - forecastbench)
relativerror = median(abs(ferror / ferrorbench))
return(round(relativerror, 6))
}