TomDoan wrote:1. What is H?

h=1 is an option for the horizon of forecasts being h-step(s) ahead in the version of UForeErrors where I have included MASE.

TomDoan wrote:2. The denominator is the mean absolute no change error through the training sample. Nothing else in @UFOREERRORS uses training (i.e. regression) sample data so there is nothing in the design to let you compute it within the procedure. It's probably simpler to compute it once and pass it through as an option.

Here's an attempt:

The mean absolute no change error through the training sample is defined as MANCE.

- Code: Select all
`procedure acUForeErrors actual forecast MANCE start end`

TYPE REAL MANCE

option integer MASE 0

local series RATIO

Just after

if %valid(nochange)

report(use=ureport,row=new,atcol=1) "Theil's U" sqrt(meansqr/nochange)

- Code: Select all
`if (MASE==1)`

set RATIO = abs(ferrors/MANCE)

SSTATS(mean) startl endl RATIO>>%%FERRMASE

And just after

if %valid(nochange)

report(use=ureport,row=new,atcol=1) "Theil's Relative U" sqrt(relchange/nochange)

- Code: Select all
`* MASE reported in nonpos==0 section as MASE is defined as a ratio. %%FERRMASE is always calculated.`

if (MASE==1)

report(use=ureport,row=new,atcol=1) "MASE" %%FERRMASE

else

report(use=ureport,row=new,atcol=1)

end acUForeErrors

To run:

- Code: Select all
`* MANCE is calculated from the training period:`

set den / = abs(actual-actual{1})

sstats(mean) regstart regend den>>MANCE

* and then

@acUForeErrors(MASE=1) actual forecast MANCE start end

Correct?

But, am unclear as to exactly how to run as I still need to have a value for MANCE in the Parameters

@acUForeErrors(MASE=0) actual forecast MANCE start end

if option MASE=0 ???

Questions:

Does startl need to be > 1?

To clarify, are

all the loss measures, including Theil's, in UForeErrors applicable for:

(a) multi-step ahead forecasts?

(b) and also, as in

https://estima.com/docs/RATS%2010%20Use ... f#page=186 i.e. computing hth-step-ahead forecasts, and save only the hth forecast step from each rolling regression?

To include MASE in UForeErrors is not ideal, as MANCE i.e. mean(den) (or the scale) is for the training sample. It's probably better to use Theil's, as Theil is benchamrked against nochange within UForeErrors.src.