Am 15.04.2016 um 11:28 schrieb Artur T.:
It would be fine if you would share it. Thanks in advance, Sven.
I hope this is what we're talking about:
<hansl>
function matrix otherfcstats(series y, series fc)
list all = y fc
if sum(missing(all))
print "--otherfcstats(): found missings, aborting"
return {1}
endif
matrix mtemp = fcstats(y,fc)
# Root mean square error, mean abs. error
matrix out = sqrt(mtemp[2]) | mtemp[3]
# now the manual TheilU calculation
matrix my = {y}
matrix mfc = {fc}
numerator = sqrt(mean((my-mfc).^2))
denom = sqrt(mean(mfc.^2)) + sqrt(mean(my.^2))
matrix out |= numerator/denom
return out
end function
</hansl>
hth,
sven