+ All Categories
Home > Documents > Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ......

Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ......

Date post: 31-Jan-2020
Category:
Upload: others
View: 12 times
Download: 0 times
Share this document with a friend
46
Using Using Using Using Demetra Demetra Demetra Demetra+ as a + as a + as a + as a tool for time series tool for time series tool for time series tool for time series analysis analysis analysis analysis J. MURO UNIVERSIDAD DE ALCALÁ
Transcript
Page 1: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Using Using Using Using DemetraDemetraDemetraDemetra+ as a + as a + as a + as a tool for time series tool for time series tool for time series tool for time series analysisanalysisanalysisanalysisJ. MURO

UNIVERSIDAD DE ALCALÁ

Page 2: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

IntroductionIntroductionIntroductionIntroduction�Demetra+ is a family of modules on seasonal adjustment.

�It uses leading algorithms in the field: TRAMO-SEATS (Bank of Spain) and X-12-ARIMA (US Bureau of the Census).

�Two main stages: pre-adjustment and decomposition.

4/19/2016 J.MURO

Page 3: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

An overview of An overview of An overview of An overview of DemetraDemetraDemetraDemetra++++�Loading series from Excel

�Graph and descriptive statistics

�Seasonal adjustment

◦TRAMO-SEATS

◦X-12-ARIMA

4/19/2016 J.MURO

Page 4: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Layout of Layout of Layout of Layout of DemetraDemetraDemetraDemetra++++

Browsers panel

Time series

properties

Workspace panel

Logs

Actual analysis

4/19/2016 J.MURO

Page 5: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Loading series from ExcelLoading series from ExcelLoading series from ExcelLoading series from Excel

�Rules:

◦A1 cell must be empty and the A column must contain the reference dates of the observations.

◦First row cells must contain the names (or titles) of the series.

◦Columns (or rows in horizontal presentation) contain the data

◦Missing data: empty cell.

4/19/2016 J.MURO

Page 6: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Loading series from ExcelLoading series from ExcelLoading series from ExcelLoading series from Excel

�Procedure:

◦ Go to browsers panel.

◦ Click on the Excel tab.

◦ Click on the add button.

4/19/2016 J.MURO

Page 7: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data

�Use option Tools in the main menu.

�Container and Tool windows (submenus) allows to do pre-analysis procedures.

�Examples (always drag and drop):

◦ Grid

4/19/2016 J.MURO

Page 8: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data◦Chart and Growth chart

4/19/2016 J.MURO

Page 9: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data◦Spectral analysis : periodogram; autorregresivespectrum

4/19/2016 J.MURO

Page 10: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data◦Differencing (D: regular difference; BD: seasonal difference)

4/19/2016 J.MURO

Page 11: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data

�An example: Series of incoming tourism in Spain.

�Use the Excel file Tourism_2016.xls. It contains 4 incoming tourism series: United Kingdom, Germany, France and Italy. They are monthly series of the number of foreign tourists from that countries visiting Spain.

�When we load this file appears the following

4/19/2016 J.MURO

Page 12: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data

4/19/2016 J.MURO

Page 13: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data

4/19/2016 J.MURO

Your series are now in DEMETRA + and you can use the options presented above. For example this is a multiple graph of the series

Page 14: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data

4/19/2016 J.MURO

Browse the different options in Tools tab. At this moment one of the more interesting options is Differencing.

Page 15: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Single series analysisSingle series analysisSingle series analysisSingle series analysis

•Two alternative (identical) options:

� Main menu: Seasonal adjustment/single analysis/wizard

� Double click in the browsers panel (series).

4/19/2016 J.MURO

Page 16: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Predefined specifications Predefined specifications Predefined specifications Predefined specifications ((((TramoTramoTramoTramo))))

Method Name Explanation

Tramo-Seats RSA0 level, airline model

Tramo-Seats RSA1 log/level, outliers detection, airline model

Tramo-Seats RSA2 log/level, working days, Easter , outliers detection,

airline model

Tramo-Seats RSA3 log/level, outliers detection, automatic model

identification

Tramo-Seats RSA4 log/level, working days, Easter , outliers detection,

automatic model identification

Tramo-Seats RSA5 log/level, trading days, Easter , outliers detection,

automatic model identification

4/19/2016 J.MURO

Page 17: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

ResultsResultsResultsResults

�Output (TRAMO-SEATS) is organized in four sections:

◦Main results

◦Pre-processing (TRAMO)

◦Decomposition (SEATS)

◦Diagnostics

4/19/2016 J.MURO

Page 18: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Main resultsMain resultsMain resultsMain results

�The page contains a short description of the used model and of the quality of the seasonal adjustment.

�Items: selected model; outliers corrections; calendar effects (leap year, working days, Easter effect…); components variance; visual tests…….

4/19/2016 J.MURO

Page 19: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

PrePrePrePre----processingprocessingprocessingprocessing

�Description and properties of pre-adjustment step.

�Items: ARIMA model selected; regression variables; residuals tests….

4/19/2016 J.MURO

Page 20: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

DecompositionDecompositionDecompositionDecomposition

�It contains the ARIMA models which are defined by SEATS: seasonally adjusted (sa) series; trend-cycle component; seasonal component; irregular component.

4/19/2016 J.MURO

Page 21: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

DiagnosticsDiagnosticsDiagnosticsDiagnostics

�Very detailed information on the seasonal adjustment procedures.

4/19/2016 J.MURO

Page 22: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Quality indicatorsQuality indicatorsQuality indicatorsQuality indicators

4/19/2016 J.MURO

For any processing DEMETRA offers a quality

indicator whose meaning is

Page 23: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Quality indicatorsQuality indicatorsQuality indicatorsQuality indicators

4/19/2016 J.MURO

Page 24: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external file Saving results to an external file Saving results to an external file Saving results to an external file (single series analysis)(single series analysis)(single series analysis)(single series analysis)

�In single analysis you can save your results to an external Excel file through

◦TramoSeatsdoc-j/copy/results

◦Where TramoSeatsdoc-j is the name of the single processing output.

◦For example, with Germany series and RSA5 the output is

4/19/2016 J.MURO

Page 25: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external fileSaving results to an external fileSaving results to an external fileSaving results to an external file

4/19/2016 J.MURO

Page 26: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external fileSaving results to an external fileSaving results to an external fileSaving results to an external file

And to export your results

4/19/2016 J.MURO

Page 27: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external Saving results to an external Saving results to an external Saving results to an external file file file file (single series analysis)(single series analysis)(single series analysis)(single series analysis)

�There is not a built-in procedure to save your results to a specific file.

�Then, previously you should create an excel file, for instance, results01.xls.

�Once you have copied your results in Demetra, open the results01.xls file and paste them.

4/19/2016 J.MURO

Page 28: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external Saving results to an external Saving results to an external Saving results to an external file file file file (single series analysis)(single series analysis)(single series analysis)(single series analysis)

�You can change the output content (number of series to be generated) through the options menu.

�For the Germany data, you get

4/19/2016 J.MURO

Page 29: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external fileSaving results to an external fileSaving results to an external fileSaving results to an external file

4/19/2016 J.MURO

Page 30: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external Saving results to an external Saving results to an external Saving results to an external file file file file (single series analysis)(single series analysis)(single series analysis)(single series analysis)

�All series with the option true are saved.

�Any series you do not want must have the option false.

4/19/2016 J.MURO

Page 31: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

•The best option is:

�Main menu: Seasonal adjustment/multi-processing/wizard

�Remember that drag and drop procedure makes that a single series analysis amounts to a multiple series analysis with only one series.

4/19/2016 J.MURO

Page 32: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

•Example: series in Tourim.xls.

4/19/2016 J.MURO

Page 33: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

4/19/2016 J.MURO

Always drag

and drop

Page 34: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

4/19/2016 J.MURO

Page 35: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

4/19/2016 J.MURO

Page 36: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

4/19/2016 J.MURO

Page 37: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

ResultsResultsResultsResults

�For multi-processing results click on the desired series name and use the option matrix view. On the right-hand side (vertical position) you can use all the option tabs: main, calendar, outliers…….

4/19/2016 J.MURO

Page 38: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

ResultsResultsResultsResults

4/19/2016 J.MURO

Page 39: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external fileSaving results to an external fileSaving results to an external fileSaving results to an external file

�In multiple series analysis you can save your results to an external Excel file through

◦SAprocessing-j/generate output

◦Where SAprocessing-j is the name of the multiple series processing output.

4/19/2016 J.MURO

Page 40: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external fileSaving results to an external fileSaving results to an external fileSaving results to an external file

4/19/2016 J.MURO

Page 41: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Saving results to an external fileSaving results to an external fileSaving results to an external fileSaving results to an external file

�In this case (professional analysis) there is a built-in procedure to save your results to a specific file whose name (and path) is in Folder option.

4/19/2016 J.MURO

Page 42: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Multiple series analysisMultiple series analysisMultiple series analysisMultiple series analysis

�All other facilities for multiple processing are fairly similar to the single series analysis.

4/19/2016 J.MURO

Page 43: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

OutliersOutliersOutliersOutliers

�A final words on outliers detection.

4/19/2016 J.MURO

Page 44: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

OutliersOutliersOutliersOutliers

�Modelling outliers is made by introducing a set of dummy regressors defined in a suitable way so as to capture this kind of abrupt changes in the series.

4/19/2016 J.MURO

Page 45: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

Outliers definition (Outliers definition (Outliers definition (Outliers definition (TRAMOTRAMOTRAMOTRAMO----SEATS)SEATS)SEATS)SEATS)

4/19/2016 J.MURO

Page 46: Using Demetra Using Demetra+ as a tool for time series ... · tool for time series analysis ... Demetra, open the results01.xls file and paste them. 4/19/2016 J.MURO. Saving results

ReferencesReferencesReferencesReferencesN. A. KOÇAK (2010). An Analysis of German Industrial Production with DEMETRA+.

Demetra+ User Manual November 2012.

DURBIN J. and S.J. KOOPMAN (2001): Time Series Analysis by State Space Methods. Oxford University Press.

GOMEZ V. and A. MARAVALL (1994): "Estimation, Prediction, and Interpolation for Nonstationary Series With the Kalman Filter", Journal of the American Statistical Association, 89 (426), 611-624.

HARVEY, A.C. (1989): Forecasting, Structural Time Series Models and the KalmanFilter. Cambridge University Press.

LJUNG, G. M. and G. E. P. BOX (1979): "The likelihood function of stationary autoregressive-moving average models". Biometrika, 66, 265–270.

OTTO, M. C., W. R. BELL, and J. P. BURMAN (1987): "An iterative GLS approach to maximum likelihood estimation of regression models with ARIMA errors". Proceedings of the American Statistical Association, Business and Economic. Statistics Section, 632–637.

4/19/2016 J.MURO


Recommended