-
Notifications
You must be signed in to change notification settings - Fork 4
Ex_Aggregation
Direct-indirect seasonal adjustment can be easily processed using the command-line tools. We describe below the chain of commands that should be used for that purpose, using random time series.
-
Create (or read from any source) the time series
dem random2ts --count 3 -o a.xml -f
-
Indirect approach: seasonally adjust the series and aggregate them (with weights)
dem ts2sa -i a.xml --items sa | dem sa2ts | dem tsaggregate -w 0.5,0.25,0.25 -o indirect.xml
Note that we just keep the sa series and that we have to transform the sa output to the usual ts format (usingsa2ts
) -
Direct approach: compute the aggregate and seasonal adjust it
dem tsaggregate -i a.xml -w 0.5,0.25,0.25 | dem ts2sa --items sa | dem sa2ts -o direct.xml
-
Seasonality tests on the series
dem ts2seasonalitytests -i indirect.xml -o indirect.csv
dem ts2seasonalitytests -i direct.xml -o direct.csv