Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Ex_Aggregation

Philippe Charles edited this page Mar 23, 2017 · 7 revisions

Direct/indirect seasonal adjustment

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.

  1. Create (or read from any source) the time series
    dem random2ts --count 3 -o a.xml -f

  2. 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 (using sa2ts)

  3. 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

  4. Seasonality tests on the series
    dem ts2seasonalitytests -i indirect.xml -o indirect.csv
    dem ts2seasonalitytests -i direct.xml -o direct.csv

Clone this wiki locally