Allin
Page 2 of the X12 manual states "Observations must be equally spaced
in time, and missing values are not allowed. As you say there are
circumstances in which -99999 can be used as an indicator of a missing
value. However this is not true in all cases. If I insert and
interior -99999 in Henrique's dataset I think that It is being
transferred from Gretl to X12 as a number and causing X12-ARIMA to
crash. For Henrique's data the basic X12-ARIMA specification is
series{
period=12
title="teste1"
start=2001.1
data=(
2.44242 2.06569 2.7564 2.32389 2.58068 2.35682 2.4838
2.56693 2.0246 2.23309 1.95265 1.5527 1.91115 1.75875
1.7979 1.99489 1.90233 1.80959 2.41727 2.06787 1.99527
2.14675 1.94359 1.70031 1.94852 1.93438 1.9655 2.02454
2.15763 1.91898 2.25941 2.05011 2.43538 2.55376 2.31279
2.26303 2.3231 2.04155 3.01209 2.41058 2.41362 2.95703
2.91066 3.04607 3.1909 3.04472 3.21475 2.9296 2.88241
2.5542 3.104 2.876 3.147 3.41 3.229 3.785
3.162 3.079 3.342 3.18 3.331 2.964 3.708
3.242 3.549 3.55 4.078 4.558 4.125 4.354
4.053 3.61378 4.221 3.702 4.743 4.115 4.946
4.698 5.276 5.888 5.091 6.045 5.632 4.974
6.429 6.014 4.601 5.859 7.254 7.477 8.122
8.026 8.297 8.43 6.772 5.153 4.883 3.752
4.406 3.819 4.286 4.68 5.452 5.42 5.843
6.113 5.605 5.441 -99999 5.629 7.231 6.318
6.55 6.725 7.534 )
}
automdl{}
x11{ save=( d11 d12 d13 ) }
The following code changes the default missing value code to 999999
and inserts a missing value code in the dqata for January 2010. I
have also added a transform{function=auto} specification. This
selects between a levels and a log transformation of the data using
AIC. In the specification below I have also added outlier detection.
It might be useful to incorporate these specifications into Gretl's
interface. Trading day and Easter adjustments may be important for
flow data.
series{
period=12
title="teste2"
start=2001.1
missingcode=999999
data=(
2.44242 2.06569 2.7564 2.32389 2.58068 2.35682 2.4838
2.56693 2.0246 2.23309 1.95265 1.5527 1.91115 1.75875
1.7979 1.99489 1.90233 1.80959 2.41727 2.06787 1.99527
2.14675 1.94359 1.70031 1.94852 1.93438 1.9655 2.02454
2.15763 1.91898 2.25941 2.05011 2.43538 2.55376 2.31279
2.26303 2.3231 2.04155 3.01209 2.41058 2.41362 2.95703
2.91066 3.04607 3.1909 3.04472 3.21475 2.9296 2.88241
2.5542 3.104 2.876 3.147 3.41 3.229 3.785
3.162 3.079 3.342 3.18 3.331 2.964 3.708
3.242 3.549 3.55 4.078 4.558 4.125 4.354
4.053 3.61378 4.221 3.702 4.743 4.115 4.946
4.698 5.276 5.888 5.091 6.045 5.632 4.974
6.429 6.014 4.601 5.859 7.254 7.477 8.122
8.026 8.297 8.43 6.772 5.153 4.883 3.752
4.406 3.819 4.286 4.68 5.452 5.42 5.843
6.113 5.605 5.441 999999 5.629 7.231 6.318
6.55 6.725 7.534 )
}
transform{function=auto}
outliers{}
automdl{}
x11{ save=( d11 d12 d13 ) }
The transform specification is probably important if you wish to do an
automatic adjustment. As far as I know this is the way TRAMO works.
Most economic series need a log transformation before adjustment. On
occasion one may wish to transform even though the statistics say
otherwise. However in such cases the differences may be very small.
An outlier specification is usually included. The default is usually sufficient.
In addition for flow data trading day and easter (and other holiday)
adjustments are usually included.
On 10 September 2010 00:12, Allin Cottrell <cottrell(a)wfu.edu> wrote:
On Thu, 9 Sep 2010, John C Frain wrote:
> My initial encounter with seasonal adjustment was as a
> statistician in the Central Statistics Office in Dublin...
Thanks, John, for presenting the expert's view!
Although I recently conceded to Henrique's request to trim leading
and trailing NAs from the sample passed to X-12-ARIMA, the reason
I hadn't done that before was that I had the idea that x12a could
handle missing values, if they were given as -9999 (or -99999?).
In your previous posting you said,
"While the X12-ARIMA manual states that missing values are not
allowed there are ways around this. If the missing value is
replaced by -99999 then -99999 may be replaced by a value that is
regarded as an outlier and then this may be replace by the
appropriate Reg-ARIMA fitted value for the purpose of estimation
seasonal factors etc. This may require specific X12ARIMA options
to be in effect and running X12-ARIMA outside of Gretl."
This gives me a general notion, but not enough in the way of
specifics to correct my previous (mis-)conception. Do you know of
a specific option that can be passed to x12a to get it to
interpret -99999 as missing? If so, that could easily be added to
gretl's invocation of the program.
As regards gretl native code, as you noted we don't accept
interior missing values for any dynamic time-series estimators.
This is more restrictive than it needs to be: our native Kalman
filter can handle NAs, and so our native AR(I)MA (which uses
Kalman) should also be able to handle them. But so far this
remains on the TODO list (on which there are many other things).
Allin
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
--
John C Frain
Economics Department
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:frainj@tcd.ie
mailto:frainj@gmail.com