Am 04.01.2022 um 14:40 schrieb Sven Schreiber:
Hi, I've taken a look at current git master to see what's the
status quo
there. AFAICS, the new bundle argument is being passed around internally
already, for example in seasonally_adjust_series() in lib/src/genfuncs.c
or in adjust_series() in plugin/tramo-x12a.c. However, nothing is done
with that bundle yet -- this is not a criticism but just to clarify
where we are, and so that we don't forget.
Ah sorry, I now see that that's not really true -- in adjust_series()
there's already a call to parse_deseas_bundle() in the X13 case. See below.
For example, if te choice between X13 and Tramo is given in the new
bundle (as opposed to the old string argument), the check in
seasonally_adjust_series needs to honor that.
Also, I now understand that the bundle is only for X13, so there is no
need and no support for choosing Tramo there. OK!
So it looks as if transferring any user options from the new options
bundle would be quite easy, the infrastructure is already there (for
x13). This in turn suggests that we need to specify the recognized or
admissible option names for the new bundle, right?
And these option names are already given in parse_deseas_bundle() (in
tramo_x12a.c):
------
Bools:
- outlier_correction (internally "outliers")
- seats
- airline -- AFAIK, imposes an ARIMA (0,1,1)(0,1,1) model
- easter
Integers:
- logtrans (0 (but 2 internally): no log, 1: force log, 2 (3
internally): auto)
- trading_days (internally "trdays"), between 0 and 2
- output (between 1 and 3, but internally zero-based)
- verbose (mandatory perhaps?)
Scalar/Floatingp.:
- critical, between 2 and 10 (for outlier correction apparently)
------
So basically this should work already, just isn't documented. And
indeed, the following simple test works well on a recent snapshot (after
installing x13as, of course):
<hansl>
bundle bopt = _(easter=TRUE, logtrans=0)
series check1 = deseas(g, bopt)
bopt.logtrans = 1
series check2 = deseas(g, bopt)
</hansl>
Excellent so far!
So here's my take on which JDemetra pre-defined specs at the link in an
earlier message can already be done with the existing apparatus:
bundle RSA0_opts = _(logtrans=0, trading_days=0, easter=FALSE, \
outlier_correction=FALSE, airline=TRUE)
bundle RSA1_opts = _(logtrans=2, trading_days=0, easter=FALSE, \
outlier_correction=TRUE, airline=TRUE)
bundle RSA2_opts = <impossible as no option for working days exists>
bundle RSA3_opts = _(logtrans=2, trading_days=0, easter=FALSE, \
outlier_correction=TRUE, airline=FALSE)
# assuming that airline=FALSE invokes an automatic search?!
bundle RSA4_opts = <impossible as no option for working days exists>
bundle RSA5_opts = _(logtrans=2, trading_days=1, easter=TRUE, \
outlier_correction=TRUE, airline=FALSE)
# assuming that airline=FALSE invokes an automatic search?!
# assuming that trading_days=1 forces them on?
As regards the "working day" effect mentioned in the JDemetra
documentation, I haven't found that keyword in the X13 reference. Does
something like that exist there as a pre-defined option which could also
be passed from gretl eventually?
Cross-checking the results of course remains to be done!
thanks
sven