Instituut voor toegepaste statistiek en data-analyse Geaccrediteerd door de Vereniging voor Statistiek

# Course Time Series using STATA (3 days)

#### Description

This course reviews methods for Time Series Analysis and shows how to perform the analysis using Stata. The course covers methods for data management, estimation, model selection, hypothesis testing, and interpretation. Exercises will supplement the lectures and Stata examples.

#### Participants profile

The course is open to graduate students, postdoctoral fellows as well as practising researchers a.o. economists, forecasters, financial analysts, managers, and anyone who encounters time series data.
Prior to the course, participants should have working knowledge of regression models and should be familiar with STATA. The course is open to a maximum of 20 participants.

#### Program content

Day 1 – Introduction: Basic Stata manipulations (Overview, very brief)

• Time series data in Stata
• Date/time in Stata
• Setting data as time series data: tsset
• User-written command (Wiggins and Baum, 2000): tsmktim
• Subsetting periods: t-in/t-within
• Merge and time series append: merge & tsappend
• Time series operators
• Difference operator
• Seasonal difference operator
• Fill in gaps in time series variable: tsfill

Filters (tssmooth)

•  Intro: econometric theory on filters
•  Moving average filter: ma
•  Single exponential smoothing: exponential
•  Double exponential smoothing: dexponential
•  Holt-Winters (seasonal and non-seasonal) filters: hwinters & shwinters
•  Non-linear filters: nl

Regression analysis with time series data

• Intro: econometric theory on regression analysis with time series data and autocorrelation
• Basic regression analysis
• Autocorrelation
• The Durbin–Watson test: estat dwatson
• Durbin’s alternative test for serial correlation: estat durbinalt
• Breusch-Godfrey test for higher-order serial correlation: estat bgodfrey
• Estimation with autocorrelated errors
• The Newey-West covariance matrix estimator: newey
• Cochrane-Orcutt and Prais-Winsten methods: prais
• Lagged dependent variables as regressors
• Dummy variables and additive seasonal effects

ARIMA Processes

• Intro: econometric theory on ARIMA processes
• Correlogram and partial correlogram: ac, pac & corrgram
• Fitting ARIMA model: arima
• ARIMA postestimation: predict
• AIC and SBIC information criteria: estatic
• Errors white noise?
• Graphing the errors: tsline, scatter
• Breusch-Godfrey test: estat bgodfrey
• White noise test: wntestq

How to simulate an AR & MA process in Stata (optional)

Day 2

Unit-root test

• Intro: econometric theory on unit-root tests
• Phillips and Perron test: pperron
• DFGLS test: dfgls

User-written unit-root tests (optional)

• KPSS test (H0: series is stationary): kpss
• In the presence of one structural break: zandrews
• In the presence of more than one structural break: clemao2 & clemio2
• Seasonal unit root test in Stata (HEGY test): sroot

Cointegration

• Intro: econometric theory on cointegration
• Engle and Granger
• Johansen (see VAR)
• Granger causality test (see VAR)

VAR (multivariate)

•  Intro: econometric theory on VAR
•  Lag order selection (lr test or information criteria): varsoc
•  Estimate var: var & varbasic
•  VAR postestimation: predict
•  Test whiteness of residuals
•  Graphing the errors: tsline, scatter
•  Ljung-Box Portmanteau (Q) test: wntstmvq
•  LM test for residual autocorrelation: varlmar
•  Test normality of residuals (the multivariate generalization of the Jarque-Bera test): varnorm
•  Test VAR stability: varstable
•  VAR forecasts and graphics: fcast compute & fcast graph
•  Granger causality test: vargranger

Day 3

VECM (multivariate)

• Intro: econometric theory on VECM
• Lag order selection (lr test or information criteria): varsoc
• Rank of cointegration (Johansen’s test): vecrank
• Estimate VECM: vec
• VECM postestimation: predict
• Test whiteness of residuals
• Graphing the errors: tsline, scatter
• Ljung-Box Portmanteau (Q) test: wntstmvq
• LM test for residual autocorrelation:   veclmar
• Test normality of residuals (the multivariate generalization of the Jarque-Bera test):  vecnorm
• Test VECM stability: vecstable
• VECM forecasts and graphics: fcast compute & fcast graph

Structural VAR (SVAR)

• Intro: econometric theory on SVAR
• Setting matrices: matrix
• Estimate SVAR: svar
• Constraints: constraint define

Impulse response functions (irf)

• Intro: econometric theory on irfs
• Create and analyze IRFs: irf create
• Set the active IRF file: irf set
• Describe an IRF file: irf describe
• Graph IRFs: irf graph
• Combine graphs of IRFs: irf cgraph
• Graph overlaid IRFs: irf ograph
• Create tables of IRFs: irf table
• Combine tables of IRFs: irf ctable
• Rename an IRF result in an IRF file: irf rename
• Drop IRF results from the active IRF file: irf drop
• Add results from an IRF file to the active IRF file: irf add

#### Course fee

Course fee: €2350, VAT-free

#### Location

Europalaan 400 | 3526 KS Utrecht

#### Language

English language is the working language of the course.