Estimating Markov-switching regression models in Stata

Size: px
Start display at page:

Download "Estimating Markov-switching regression models in Stata"

Transcription

1 Estimating Markov-switching regression models in Stata Ashish Rajbhandari Senior Econometrician StataCorp LP Stata Conference 2015 Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

2 ARMA models Time series data are autocorrelated due to the dependence with past values. Autoregressive moving average (ARMA) class of models is a popular tool to model such autocorrelations. The AR part models the current value as a weighted average of past values with some error. y t = φy t 1 + ε t where y t is the observed series φ is the autoregressive parameter ε t is an IID error with mean 0 and variance σ 2 Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

3 ARMA(1,1) model The MA part models the current value as a weighted average of past errors. y t = ε t + θε t 1 where θ is the moving average parameter. The AR and MA models generate completely different autocorrelations. Combining these lead to a flexible way to capture various correlation patterns observed in time series data. y t = φy t 1 + ε t + θε t 1 Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

4 Linear ARMA models Current value of the series is linearly dependent on past values The parameters do not change throughout the sample This precludes many interesting features observed in the data Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

5 Examples In economics, the average growth rate of gross domestic product (GDP) tend to be higher in expansions than in recessions. Furthermore, expansions tend to last longer than recessions In finance, stock returns display periods of high and low volatility over the course of years In public health, incidence of infectious disease tend be different under epidemic and non-epidemic states Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

6 Nonlinear models In all these examples, the dynamics are state-dependent. The states may be recession and expansion, high volatility and low volatility, or epidemic and non-epidemic states Parameters may be changing according to the states Nonlinear models aim to characterize such features observed in the data Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

7 Markov-switching model Hamilton (1989) Finite number of unobserved states Suppose there are two states 1 and 2 Let s t denote a random variable such that s t = 1 or s t = 2 at any time s t follows a first-order Markov process Current value of s t depends only on the immediate past value We do not know which state the process is in but can only estimate the probabilities The process can switch between states repeatedly over the sample Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

8 Features Estimate the state-dependent parameters Estimate transition probabilities P(s t = j s t 1 = i) = p ij Probability of transitioning from state i to state j Estimate the expected duration of a state Estimate state-specific predictions Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

9 Background Consider the following state-dependent AR(1) model y t = µ st + φ st y t 1 + ε t where ε t N(0, σ 2 s t ) s t is discrete and denotes the state at time t The parameters µ, φ, and σ 2 are state-dependent The number of states are imposed apriori For example, a two-state model can be expressed as { µ 1 + φ 1 y t 1 + ε t,1 if s t = 1 y t = µ 2 + φ 2 y t 1 + ε t,2 if s t = 2 Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

10 Assumptions on the state variable Recall the two-state model { µ 1 + φ 1 y t 1 + ε t,1 if s t = 1 y t = µ 2 + φ 2 y t 1 + ε t,2 if s t = 2 If the timing when the process switches states is known, we could Create indicator variables to estimate the parameters in different states. For example economic crisis may alter the dynamics of a macroeconomic variable. Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

11 States are unobserved s t is drawn randomly every period from a discrete probability distribution Switching regresssion model The realization of s t at each period are independent from that of the previous period s t follows a first-order Markov process The current realization of the state depends only on the immediate past s t is autocorrelated Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

12 mswitch regression command in Stata Markov-switching autoregression mswitch ar depvar [ nonswitch varlist ] [ if ] [ in ], ar(numlist) [ options ] Markov-switching dynamic regression mswitch dr depvar [ nonswitch varlist ] [ if ] [ in ] [, options ] Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

13 MSAR with 4 lags Hamilton (1989) models the quarterly growth rate of real GNP as a two state model The dataset spans the period 1951q1-1984q4 The states are expansion and recession rgnp t = µ st + φ 1 (rgnp t 1 µ st 1 ) + φ 2 (rgnp t 2 µ st 2 )+ φ 3 (rgnp t 3 µ st 3 ) + φ 4 (rgnp t 4 µ st 4 ) + ε t Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

14 Quarterly growth rate of US RGNP 1950q1 1951q2 1952q3 1953q4 1955q1 1956q2 1957q3 1958q4 1960q1 1961q2 1962q3 1963q4 1965q1 1966q2 1967q3 1968q4 1970q1 1971q2 1972q3 1973q4 1975q1 1976q2 1977q3 1978q4 1980q1 1981q2 1982q3 1983q4 1985q recession growth rate US RGNP Figure : Quarterly growth rate of US RGNP Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

15 Markov-switching autoregression. mswitch ar rgnp, ar(1/4) nolog Performing EM optimization: Performing gradient-based optimization: Markov-switching autoregression Sample: 1952q2-1984q4 No. of obs = 131 Number of states = 2 AIC = Unconditional probabilities: transition HQIC = SBIC = Log likelihood = rgnp rgnp Coef. Std. Err. z P> z [95% Conf. Interval] ar L L L L State1 _cons State2 _cons sigma p p Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

16 Transition probabilities State 1 is recession and State 2 is expansion. Let P denote a transition probability matrix for 2 states. The elements of P are [ ] [ ] p11 p P = = p 21 p such that j p ij = 1 for i,j = 1,2. p 11 denotes the probability of transitioning to recession in the next period given that the current state is in recession. Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

17 Predicting the probability of recession q1 1951q2 1952q3 1953q4 1955q1 1956q2 1957q3 1958q4 1960q1 1961q2 1962q3 1963q4 1965q1 1966q2 1967q3 1968q4 1970q1 1971q2 1972q3 1973q4 1975q1 1976q2 1977q3 1978q4 1980q1 1981q2 1982q3 1983q4 1985q1 date (quarters) recession probability of recession Figure : Probability of recession Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

18 Expected duration Compute the expected duration the series spends in a state Let D i denote the duration of state i D i follows a geometric distribution The expected duration is E[D i ] = 1 1 p ii The closer p ii is to 1, the higher is the expected duration of state i Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

19 Estimating duration of a state. estat duration Number of obs = 131 Expected Duration Estimate Std. Err. [95% Conf. Interval] State State Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

20 Equivalent AR specifications Consider the following equivalent AR(1) models: y t δ = φ(y t 1 δ) + ε t y t = µ + φy t 1 + ε t The unconditional means for the above models are related: δ = µ 1 φ Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

21 MSAR and MSDR specifications This equivalence is not possible if the mean is state-dependent y t = δ st + φ(y t 1 δ st 1 ) + ε t y t = µ st + φy t 1 + ε t (AR) (DR) A one time change in the state leads to an immediate shift in the mean level in the AR specification. A one time change in the state leads to the mean level changing smoothly over several time periods in the DR specification. Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

22 State vector of MSAR The observed series depends on the value of states at time t and t 1. A two-state Markov process becomes a four-state Markov process. In general, AR specification increases the state vector by the factor K p+1, where p is the number of lags. Used for modeling data with smaller frequency such as quarterly, annual, etc. Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

23 Markov-switching model of interest rates interest rate q1 1967q3 1980q1 1992q3 2005q1 date (quarters) Figure : Short term interest rate Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

24 Estimating interest rates Estimate using data for the period 1955q3-2005q4 Assume the following specification for interest rates where intrate is the interest rate e st N(0, σ 2 s t ) µ and σ 2 is state-dependent intrate t = µ st + e st Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

25 Estimate the model using mswitch dr. mswitch dr intrate, varswitch nolog Performing EM optimization: Performing gradient-based optimization: Markov-switching dynamic regression Sample: 1954q3-2005q4 No. of obs = 206 Number of states = 2 AIC = Unconditional probabilities: transition HQIC = SBIC = Log likelihood = intrate Coef. Std. Err. z P> z [95% Conf. Interval] State1 _cons State2 _cons sigma sigma p p Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

26 Predicted probability of State q1 1967q3 1980q1 1992q3 2005q1 date (quarters) stdintrate probability of State 2 Figure : Predicted probabilities using MSDR model Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

27 Dynamic forecasting with MSAR Estimate using data for the period 1955q3-1999q4 Assume the following specification for interest rates intrate t = µ st + ρ intrate t 1 + φ st inflation t + γ st ogap t + e t where intrate is the interest rate inflation is the inflation rate ogap is the output gap e t N(0, σ 2 ) ρ is constant µ, φ, and γ are state-dependent Out-of-sample forecasting from period 2000q1-2007q1 Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

28 Estimate the model using mswitch dr. mswitch dr intrate L.intrate if tin(,1999q4), switch(inflation ogap) nolog Performing EM optimization: Performing gradient-based optimization: Markov-switching dynamic regression Sample: 1955q3-1999q4 No. of obs = 178 Number of states = 2 AIC = Unconditional probabilities: transition HQIC = SBIC = Log likelihood = intrate Coef. Std. Err. z P> z [95% Conf. Interval] intrate intrate L State1 inflation ogap _cons State2 inflation ogap _cons sigma p p Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

29 Out-of-sample dynamic forecasts q3 2002q1 2003q3 2005q1 2006q3 date (quarters) interest rate forecasts in State 1 forecasts in State 2 weighted forecasts Figure : Forecasts using MSDR model Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

30 Thank you! Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

31 Hamilton, J. D. (1989), A new approach to the economic analysis of nonstationary time series and the business cycle, Econometrica 57(2), Ashish Rajbhandari (StataCorp LP) Markov-switching regression Stata Conference / 31

Introduction to Markov-switching regression models using the mswitch command

Introduction to Markov-switching regression models using the mswitch command Introduction to Markov-switching regression models using the mswitch command Gustavo Sánchez StataCorp May 18, 2016 Aguascalientes, México (StataCorp) Markov-switching regression in Stata May 18 1 / 1

More information

Postestimation commands predict estat Remarks and examples Stored results Methods and formulas

Postestimation commands predict estat Remarks and examples Stored results Methods and formulas Title stata.com mswitch postestimation Postestimation tools for mswitch Postestimation commands predict estat Remarks and examples Stored results Methods and formulas References Also see Postestimation

More information

Autoregressive and Moving-Average Models

Autoregressive and Moving-Average Models Chapter 3 Autoregressive and Moving-Average Models 3.1 Introduction Let y be a random variable. We consider the elements of an observed time series {y 0,y 1,y2,...,y t } as being realizations of this randoms

More information

9) Time series econometrics

9) Time series econometrics 30C00200 Econometrics 9) Time series econometrics Timo Kuosmanen Professor Management Science http://nomepre.net/index.php/timokuosmanen 1 Macroeconomic data: GDP Inflation rate Examples of time series

More information

Do Markov-Switching Models Capture Nonlinearities in the Data? Tests using Nonparametric Methods

Do Markov-Switching Models Capture Nonlinearities in the Data? Tests using Nonparametric Methods Do Markov-Switching Models Capture Nonlinearities in the Data? Tests using Nonparametric Methods Robert V. Breunig Centre for Economic Policy Research, Research School of Social Sciences and School of

More information

4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2. Mean: where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore,

4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2. Mean: where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore, 61 4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2 Mean: y t = µ + θ(l)ɛ t, where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore, E(y t ) = µ + θ(l)e(ɛ t ) = µ 62 Example: MA(q) Model: y t = ɛ t + θ 1 ɛ

More information

Econometrics. 9) Heteroscedasticity and autocorrelation

Econometrics. 9) Heteroscedasticity and autocorrelation 30C00200 Econometrics 9) Heteroscedasticity and autocorrelation Timo Kuosmanen Professor, Ph.D. http://nomepre.net/index.php/timokuosmanen Today s topics Heteroscedasticity Possible causes Testing for

More information

Estimating dynamic stochastic general equilibrium models in Stata

Estimating dynamic stochastic general equilibrium models in Stata Estimating dynamic stochastic general equilibrium models in Stata David Schenck Senior Econometrician Stata 2017 Canadian Stata User Group Meeting June 9, 2017 Schenck (Stata) DSGE June 9, 2017 1 / 21

More information

Dynamic stochastic general equilibrium models in Stata 15

Dynamic stochastic general equilibrium models in Stata 15 Dynamic stochastic general equilibrium models in Stata 15 David Schenck Senior Econometrician Stata October 11, 2017 Schenck (Stata) DSGE October 11, 2017 1 / 25 Motivation Models used in macroeconomics

More information

Title. Description. Remarks and examples. stata.com. stata.com. Introduction to DSGE models. intro 1 Introduction to DSGEs and dsge

Title. Description. Remarks and examples. stata.com. stata.com. Introduction to DSGE models. intro 1 Introduction to DSGEs and dsge Title stata.com intro 1 Introduction to DSGEs and dsge Description Remarks and examples References Also see Description In this entry, we introduce DSGE models and the dsge command. We begin with an overview

More information

Question 1 [17 points]: (ch 11)

Question 1 [17 points]: (ch 11) Question 1 [17 points]: (ch 11) A study analyzed the probability that Major League Baseball (MLB) players "survive" for another season, or, in other words, play one more season. They studied a model of

More information

A Comparison of Business Cycle Regime Nowcasting Performance between Real-time and Revised Data. By Arabinda Basistha (West Virginia University)

A Comparison of Business Cycle Regime Nowcasting Performance between Real-time and Revised Data. By Arabinda Basistha (West Virginia University) A Comparison of Business Cycle Regime Nowcasting Performance between Real-time and Revised Data By Arabinda Basistha (West Virginia University) This version: 2.7.8 Markov-switching models used for nowcasting

More information

Lecture#17. Time series III

Lecture#17. Time series III Lecture#17 Time series III 1 Dynamic causal effects Think of macroeconomic data. Difficult to think of an RCT. Substitute: different treatments to the same (observation unit) at different points in time.

More information

Testing methodology. It often the case that we try to determine the form of the model on the basis of data

Testing methodology. It often the case that we try to determine the form of the model on the basis of data Testing methodology It often the case that we try to determine the form of the model on the basis of data The simplest case: we try to determine the set of explanatory variables in the model Testing for

More information

Autoregressive models with distributed lags (ADL)

Autoregressive models with distributed lags (ADL) Autoregressive models with distributed lags (ADL) It often happens than including the lagged dependent variable in the model results in model which is better fitted and needs less parameters. It can be

More information

Switching Regime Estimation

Switching Regime Estimation Switching Regime Estimation Series de Tiempo BIrkbeck March 2013 Martin Sola (FE) Markov Switching models 01/13 1 / 52 The economy (the time series) often behaves very different in periods such as booms

More information

Financial Econometrics Using Stata

Financial Econometrics Using Stata Financial Econometrics Using Stata SIMONA BOFFELLI University of Bergamo (Italy) and Centre for Econometric Analysis, Cass Business School, City University London (UK) GIOVANNI URGA Centre for Econometric

More information

Testing for Regime Switching in Singaporean Business Cycles

Testing for Regime Switching in Singaporean Business Cycles Testing for Regime Switching in Singaporean Business Cycles Robert Breunig School of Economics Faculty of Economics and Commerce Australian National University and Alison Stegman Research School of Pacific

More information

Unemployment Rate Example

Unemployment Rate Example Unemployment Rate Example Find unemployment rates for men and women in your age bracket Go to FRED Categories/Population/Current Population Survey/Unemployment Rate Release Tables/Selected unemployment

More information

10) Time series econometrics

10) Time series econometrics 30C00200 Econometrics 10) Time series econometrics Timo Kuosmanen Professor, Ph.D. 1 Topics today Static vs. dynamic time series model Suprious regression Stationary and nonstationary time series Unit

More information

Analyzing spatial autoregressive models using Stata

Analyzing spatial autoregressive models using Stata Analyzing spatial autoregressive models using Stata David M. Drukker StataCorp Summer North American Stata Users Group meeting July 24-25, 2008 Part of joint work with Ingmar Prucha and Harry Kelejian

More information

Time Series. Chapter Time Series Data

Time Series. Chapter Time Series Data Chapter 10 Time Series 10.1 Time Series Data The main difference between time series data and cross-sectional data is the temporal ordering. To emphasize the proper ordering of the observations, Table

More information

Cointegration and Error-Correction

Cointegration and Error-Correction Chapter 9 Cointegration and Error-Correction In this chapter we will estimate structural VAR models that include nonstationary variables. This exploits the possibility that there could be a linear combination

More information

Econ 423 Lecture Notes: Additional Topics in Time Series 1

Econ 423 Lecture Notes: Additional Topics in Time Series 1 Econ 423 Lecture Notes: Additional Topics in Time Series 1 John C. Chao April 25, 2017 1 These notes are based in large part on Chapter 16 of Stock and Watson (2011). They are for instructional purposes

More information

Non-Markovian Regime Switching with Endogenous States and Time-Varying State Strengths

Non-Markovian Regime Switching with Endogenous States and Time-Varying State Strengths Non-Markovian Regime Switching with Endogenous States and Time-Varying State Strengths January 2004 Siddhartha Chib Olin School of Business Washington University chib@olin.wustl.edu Michael Dueker Federal

More information

Stationary and nonstationary variables

Stationary and nonstationary variables Stationary and nonstationary variables Stationary variable: 1. Finite and constant in time expected value: E (y t ) = µ < 2. Finite and constant in time variance: Var (y t ) = σ 2 < 3. Covariance dependent

More information

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models Sebastian Kripfganz University of Exeter Business School, Department of Economics, Exeter, UK UK Stata Users Group

More information

Introduction to Econometrics

Introduction to Econometrics Introduction to Econometrics STAT-S-301 Introduction to Time Series Regression and Forecasting (2016/2017) Lecturer: Yves Dominicy Teaching Assistant: Elise Petit 1 Introduction to Time Series Regression

More information

Financial Econometrics

Financial Econometrics Financial Econometrics Nonlinear time series analysis Gerald P. Dwyer Trinity College, Dublin January 2016 Outline 1 Nonlinearity Does nonlinearity matter? Nonlinear models Tests for nonlinearity Forecasting

More information

Why Has the U.S. Economy Stagnated Since the Great Recession?

Why Has the U.S. Economy Stagnated Since the Great Recession? Why Has the U.S. Economy Stagnated Since the Great Recession? Yunjong Eo, University of Sydney joint work with James Morley, University of Sydney Workshop on Nonlinear Models at the Norges Bank January

More information

1 Linear Difference Equations

1 Linear Difference Equations ARMA Handout Jialin Yu 1 Linear Difference Equations First order systems Let {ε t } t=1 denote an input sequence and {y t} t=1 sequence generated by denote an output y t = φy t 1 + ε t t = 1, 2,... with

More information

Testing for spectral Granger causality

Testing for spectral Granger causality The Stata Journal (2015) 15, Number 4, pp. 1157 1166 Testing for spectral Granger causality Hüseyin Tastan Department of Economics Yildiz Technical University Istanbul, Turkey tastan@yildiz.edu.tr Abstract.

More information

News Shocks: Different Effects in Boom and Recession?

News Shocks: Different Effects in Boom and Recession? News Shocks: Different Effects in Boom and Recession? Maria Bolboaca, Sarah Fischer University of Bern Study Center Gerzensee June 7, 5 / Introduction News are defined in the literature as exogenous changes

More information

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data The 3rd Australian and New Zealand Stata Users Group Meeting, Sydney, 5 November 2009 1 Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data Dr Jisheng Cui Public Health

More information

Vector Autogregression and Impulse Response Functions

Vector Autogregression and Impulse Response Functions Chapter 8 Vector Autogregression and Impulse Response Functions 8.1 Vector Autogregressions Consider two sequences {y t } and {z t }, where the time path of {y t } is affected by current and past realizations

More information

Program. The. provide the. coefficientss. (b) References. y Watson. probability (1991), "A. Stock. Arouba, Diebold conditions" based on monthly

Program. The. provide the. coefficientss. (b) References. y Watson. probability (1991), A. Stock. Arouba, Diebold conditions based on monthly Macroeconomic Forecasting Topics October 6 th to 10 th, 2014 Banco Central de Venezuela Caracas, Venezuela Program Professor: Pablo Lavado The aim of this course is to provide the basis for short term

More information

Arma-Arch Modeling Of The Returns Of First Bank Of Nigeria

Arma-Arch Modeling Of The Returns Of First Bank Of Nigeria Arma-Arch Modeling Of The Returns Of First Bank Of Nigeria Emmanuel Alphonsus Akpan Imoh Udo Moffat Department of Mathematics and Statistics University of Uyo, Nigeria Ntiedo Bassey Ekpo Department of

More information

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests Patrick Herb Brandeis University Spring 2016 Patrick Herb (Brandeis University) Unit Root Tests ECON/FIN

More information

Understanding the multinomial-poisson transformation

Understanding the multinomial-poisson transformation The Stata Journal (2004) 4, Number 3, pp. 265 273 Understanding the multinomial-poisson transformation Paulo Guimarães Medical University of South Carolina Abstract. There is a known connection between

More information

ECON/FIN 250: Forecasting in Finance and Economics: Section 8: Forecast Examples: Part 1

ECON/FIN 250: Forecasting in Finance and Economics: Section 8: Forecast Examples: Part 1 ECON/FIN 250: Forecasting in Finance and Economics: Section 8: Forecast Examples: Part 1 Patrick Herb Brandeis University Spring 2016 Patrick Herb (Brandeis University) Forecast Examples: Part 1 ECON/FIN

More information

The simulation extrapolation method for fitting generalized linear models with additive measurement error

The simulation extrapolation method for fitting generalized linear models with additive measurement error The Stata Journal (2003) 3, Number 4, pp. 373 385 The simulation extrapolation method for fitting generalized linear models with additive measurement error James W. Hardin Arnold School of Public Health

More information

GMM Estimation in Stata

GMM Estimation in Stata GMM Estimation in Stata Econometrics I Department of Economics Universidad Carlos III de Madrid Master in Industrial Economics and Markets 1 Outline Motivation 1 Motivation 2 3 4 2 Motivation 3 Stata and

More information

THE UNIVERSITY OF CHICAGO Graduate School of Business Business 41202, Spring Quarter 2003, Mr. Ruey S. Tsay

THE UNIVERSITY OF CHICAGO Graduate School of Business Business 41202, Spring Quarter 2003, Mr. Ruey S. Tsay THE UNIVERSITY OF CHICAGO Graduate School of Business Business 41202, Spring Quarter 2003, Mr. Ruey S. Tsay Solutions to Homework Assignment #4 May 9, 2003 Each HW problem is 10 points throughout this

More information

Problem Set 2: Box-Jenkins methodology

Problem Set 2: Box-Jenkins methodology Problem Set : Box-Jenkins methodology 1) For an AR1) process we have: γ0) = σ ε 1 φ σ ε γ0) = 1 φ Hence, For a MA1) process, p lim R = φ γ0) = 1 + θ )σ ε σ ε 1 = γ0) 1 + θ Therefore, p lim R = 1 1 1 +

More information

ECON/FIN 250: Forecasting in Finance and Economics: Section 6: Standard Univariate Models

ECON/FIN 250: Forecasting in Finance and Economics: Section 6: Standard Univariate Models ECON/FIN 250: Forecasting in Finance and Economics: Section 6: Standard Univariate Models Patrick Herb Brandeis University Spring 2016 Patrick Herb (Brandeis University) Standard Univariate Models ECON/FIN

More information

Latent class analysis and finite mixture models with Stata

Latent class analysis and finite mixture models with Stata Latent class analysis and finite mixture models with Stata Isabel Canette Principal Mathematician and Statistician StataCorp LLC 2017 Stata Users Group Meeting Madrid, October 19th, 2017 Introduction Latent

More information

AR, MA and ARMA models

AR, MA and ARMA models AR, MA and AR by Hedibert Lopes P Based on Tsay s Analysis of Financial Time Series (3rd edition) P 1 Stationarity 2 3 4 5 6 7 P 8 9 10 11 Outline P Linear Time Series Analysis and Its Applications For

More information

A Beginner s Introduction. Box-Jenkins Models

A Beginner s Introduction. Box-Jenkins Models A Beginner s Introduction To Box-Jenkins Models I. Introduction In their seminal work, Time Series Analysis: Forecasting and Control (1970, Holden Day), Professors Box and Jenkins introduced a set of time

More information

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9)

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline 1 Building ARIMA Models 2 SARIMA 3 Homework 4c Arthur Berg STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) 2/ 34 Outline 1 Building ARIMA Models

More information

CENTRE FOR APPLIED MACROECONOMIC ANALYSIS

CENTRE FOR APPLIED MACROECONOMIC ANALYSIS CENTRE FOR APPLIED MACROECONOMIC ANALYSIS The Australian National University CAMA Working Paper Series May, 2005 SINGLE SOURCE OF ERROR STATE SPACE APPROACH TO THE BEVERIDGE NELSON DECOMPOSITION Heather

More information

Econ 623 Econometrics II Topic 2: Stationary Time Series

Econ 623 Econometrics II Topic 2: Stationary Time Series 1 Introduction Econ 623 Econometrics II Topic 2: Stationary Time Series In the regression model we can model the error term as an autoregression AR(1) process. That is, we can use the past value of the

More information

A Test for State-Dependent Predictive Ability based on a Markov-Switching Framework

A Test for State-Dependent Predictive Ability based on a Markov-Switching Framework A Test for State-Dependent Predictive Ability based on a Markov-Switching Framework Sebastian Fossati University of Alberta This version: May 17, 2018 Abstract This paper proposes a new test for comparing

More information

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline. Return Rate. US Gross National Product

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline. Return Rate. US Gross National Product STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline 1 Building ARIMA Models 2 SARIMA 3 Homework 4c Arthur Berg STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) 2/ 34 Return Rate Suppose x t is the value

More information

7 Introduction to Time Series

7 Introduction to Time Series Econ 495 - Econometric Review 1 7 Introduction to Time Series 7.1 Time Series vs. Cross-Sectional Data Time series data has a temporal ordering, unlike cross-section data, we will need to changes some

More information

Identifying Aggregate Liquidity Shocks with Monetary Policy Shocks: An Application using UK Data

Identifying Aggregate Liquidity Shocks with Monetary Policy Shocks: An Application using UK Data Identifying Aggregate Liquidity Shocks with Monetary Policy Shocks: An Application using UK Data Michael Ellington and Costas Milas Financial Services, Liquidity and Economic Activity Bank of England May

More information

Case of single exogenous (iv) variable (with single or multiple mediators) iv à med à dv. = β 0. iv i. med i + α 1

Case of single exogenous (iv) variable (with single or multiple mediators) iv à med à dv. = β 0. iv i. med i + α 1 Mediation Analysis: OLS vs. SUR vs. ISUR vs. 3SLS vs. SEM Note by Hubert Gatignon July 7, 2013, updated November 15, 2013, April 11, 2014, May 21, 2016 and August 10, 2016 In Chap. 11 of Statistical Analysis

More information

ECON2228 Notes 10. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 48

ECON2228 Notes 10. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 48 ECON2228 Notes 10 Christopher F Baum Boston College Economics 2014 2015 cfb (BC Econ) ECON2228 Notes 10 2014 2015 1 / 48 Serial correlation and heteroskedasticity in time series regressions Chapter 12:

More information

ECONOMICS 7200 MODERN TIME SERIES ANALYSIS Econometric Theory and Applications

ECONOMICS 7200 MODERN TIME SERIES ANALYSIS Econometric Theory and Applications ECONOMICS 7200 MODERN TIME SERIES ANALYSIS Econometric Theory and Applications Yongmiao Hong Department of Economics & Department of Statistical Sciences Cornell University Spring 2019 Time and uncertainty

More information

A lecture on time series

A lecture on time series A lecture on time series Bernt Arne Ødegaard 15 November 2018 Contents 1 Survey of time series issues 1 1.1 Definition.............................. 2 1.2 Examples.............................. 2 1.3 Typical

More information

-redprob- A Stata program for the Heckman estimator of the random effects dynamic probit model

-redprob- A Stata program for the Heckman estimator of the random effects dynamic probit model -redprob- A Stata program for the Heckman estimator of the random effects dynamic probit model Mark B. Stewart University of Warwick January 2006 1 The model The latent equation for the random effects

More information

ECON2228 Notes 10. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 54

ECON2228 Notes 10. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 54 ECON2228 Notes 10 Christopher F Baum Boston College Economics 2014 2015 cfb (BC Econ) ECON2228 Notes 10 2014 2015 1 / 54 erial correlation and heteroskedasticity in time series regressions Chapter 12:

More information

TIME SERIES DATA PREDICTION OF NATURAL GAS CONSUMPTION USING ARIMA MODEL

TIME SERIES DATA PREDICTION OF NATURAL GAS CONSUMPTION USING ARIMA MODEL International Journal of Information Technology & Management Information System (IJITMIS) Volume 7, Issue 3, Sep-Dec-2016, pp. 01 07, Article ID: IJITMIS_07_03_001 Available online at http://www.iaeme.com/ijitmis/issues.asp?jtype=ijitmis&vtype=7&itype=3

More information

Y t = log (employment t )

Y t = log (employment t ) Advanced Macroeconomics, Christiano Econ 416 Homework #7 Due: November 21 1. Consider the linearized equilibrium conditions of the New Keynesian model, on the slide, The Equilibrium Conditions in the handout,

More information

Econometric Forecasting

Econometric Forecasting Robert M. Kunst robert.kunst@univie.ac.at University of Vienna and Institute for Advanced Studies Vienna October 1, 2014 Outline Introduction Model-free extrapolation Univariate time-series models Trend

More information

Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE

Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE Intruduction Spatial regression models are usually intended to estimate parameters related to the interaction of

More information

1 Introduction. 2 AIC versus SBIC. Erik Swanson Cori Saviano Li Zha Final Project

1 Introduction. 2 AIC versus SBIC. Erik Swanson Cori Saviano Li Zha Final Project Erik Swanson Cori Saviano Li Zha Final Project 1 Introduction In analyzing time series data, we are posed with the question of how past events influences the current situation. In order to determine this,

More information

Measures of Fit from AR(p)

Measures of Fit from AR(p) Measures of Fit from AR(p) Residual Sum of Squared Errors Residual Mean Squared Error Root MSE (Standard Error of Regression) R-squared R-bar-squared = = T t e t SSR 1 2 ˆ = = T t e t p T s 1 2 2 ˆ 1 1

More information

James Morley*, Jeremy Piger and Pao-Lin Tien Reproducing business cycle features: are nonlinear dynamics a proxy for multivariate information?

James Morley*, Jeremy Piger and Pao-Lin Tien Reproducing business cycle features: are nonlinear dynamics a proxy for multivariate information? DOI 10.1515/snde-2012-0036 Stud Nonlinear Dyn E 2013; 17(5): 483 498 James Morley*, Jeremy Piger and Pao-Lin Tien Reproducing business cycle features: are nonlinear dynamics a proxy for multivariate information?

More information

BEE2006: Statistics and Econometrics

BEE2006: Statistics and Econometrics BEE2006: Statistics and Econometrics Tutorial 2: Time Series - Regression Analysis and Further Issues (Part 1) February 1, 2013 Tutorial 2: Time Series - Regression Analysis and Further Issues (Part BEE2006:

More information

Diagnostic Test for GARCH Models Based on Absolute Residual Autocorrelations

Diagnostic Test for GARCH Models Based on Absolute Residual Autocorrelations Diagnostic Test for GARCH Models Based on Absolute Residual Autocorrelations Farhat Iqbal Department of Statistics, University of Balochistan Quetta-Pakistan farhatiqb@gmail.com Abstract In this paper

More information

Monday 7 th Febraury 2005

Monday 7 th Febraury 2005 Monday 7 th Febraury 2 Analysis of Pigs data Data: Body weights of 48 pigs at 9 successive follow-up visits. This is an equally spaced data. It is always a good habit to reshape the data, so we can easily

More information

Moreover, the second term is derived from: 1 T ) 2 1

Moreover, the second term is derived from: 1 T ) 2 1 170 Moreover, the second term is derived from: 1 T T ɛt 2 σ 2 ɛ. Therefore, 1 σ 2 ɛt T y t 1 ɛ t = 1 2 ( yt σ T ) 2 1 2σ 2 ɛ 1 T T ɛt 2 1 2 (χ2 (1) 1). (b) Next, consider y 2 t 1. T E y 2 t 1 T T = E(y

More information

BJEST. Function: Usage:

BJEST. Function: Usage: BJEST BJEST (CONSTANT, CUMPLOT, EXACTML, NAR=number of AR parameters, NBACK=number of back-forecasted residuals,ndiff=degree of differencing, NLAG=number of autocorrelations,nma=number of MA parameters,

More information

Univariate linear models

Univariate linear models Univariate linear models The specification process of an univariate ARIMA model is based on the theoretical properties of the different processes and it is also important the observation and interpretation

More information

Analysing repeated measurements whilst accounting for derivative tracking, varying within-subject variance and autocorrelation: the xtiou command

Analysing repeated measurements whilst accounting for derivative tracking, varying within-subject variance and autocorrelation: the xtiou command Analysing repeated measurements whilst accounting for derivative tracking, varying within-subject variance and autocorrelation: the xtiou command R.A. Hughes* 1, M.G. Kenward 2, J.A.C. Sterne 1, K. Tilling

More information

Volatility. Gerald P. Dwyer. February Clemson University

Volatility. Gerald P. Dwyer. February Clemson University Volatility Gerald P. Dwyer Clemson University February 2016 Outline 1 Volatility Characteristics of Time Series Heteroskedasticity Simpler Estimation Strategies Exponentially Weighted Moving Average Use

More information

A Journey to Latent Class Analysis (LCA)

A Journey to Latent Class Analysis (LCA) A Journey to Latent Class Analysis (LCA) Jeff Pitblado StataCorp LLC 2017 Nordic and Baltic Stata Users Group Meeting Stockholm, Sweden Outline Motivation by: prefix if clause suest command Factor variables

More information

Obtaining Critical Values for Test of Markov Regime Switching

Obtaining Critical Values for Test of Markov Regime Switching University of California, Santa Barbara From the SelectedWorks of Douglas G. Steigerwald November 1, 01 Obtaining Critical Values for Test of Markov Regime Switching Douglas G Steigerwald, University of

More information

A Threshold Model of Real U.S. GDP and the Problem of Constructing Confidence. Intervals in TAR Models

A Threshold Model of Real U.S. GDP and the Problem of Constructing Confidence. Intervals in TAR Models A Threshold Model of Real U.S. GDP and the Problem of Constructing Confidence Intervals in TAR Models Walter Enders Department of Economics, Finance and Legal Studies University of Alabama Tuscalooosa,

More information

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15 Econ 495 - Econometric Review 1 Contents 7 Introduction to Time Series 3 7.1 Time Series vs. Cross-Sectional Data............ 3 7.2 Detrending Time Series................... 15 7.3 Types of Stochastic

More information

Are recoveries all the same?

Are recoveries all the same? Are recoveries all the same? Yu-Fan Huang, Sui Luo, and Richard Startz November 2015 Abstract Recessions and subsequent recoveries are frequently classified as L-shaped or U-shaped, with output losses

More information

Syntax Description Options Remarks and examples Stored results Methods and formulas References Also see

Syntax Description Options Remarks and examples Stored results Methods and formulas References Also see Title stata.com forecast solve Obtain static and dynamic forecasts Syntax Description Options Remarks and examples Stored results Methods and formulas References Also see Syntax forecast solve [, { prefix(stub)

More information

AR(p) + I(d) + MA(q) = ARIMA(p, d, q)

AR(p) + I(d) + MA(q) = ARIMA(p, d, q) AR(p) + I(d) + MA(q) = ARIMA(p, d, q) Outline 1 4.1: Nonstationarity in the Mean 2 ARIMA Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 2/ 19 Deterministic Trend Models Polynomial Trend Consider the

More information

Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois

Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 217, Chicago, Illinois Outline 1. Opportunities and challenges of panel data. a. Data requirements b. Control

More information

Dynamic Time Series Regression: A Panacea for Spurious Correlations

Dynamic Time Series Regression: A Panacea for Spurious Correlations International Journal of Scientific and Research Publications, Volume 6, Issue 10, October 2016 337 Dynamic Time Series Regression: A Panacea for Spurious Correlations Emmanuel Alphonsus Akpan *, Imoh

More information

LATVIAN GDP: TIME SERIES FORECASTING USING VECTOR AUTO REGRESSION

LATVIAN GDP: TIME SERIES FORECASTING USING VECTOR AUTO REGRESSION LATVIAN GDP: TIME SERIES FORECASTING USING VECTOR AUTO REGRESSION BEZRUCKO Aleksandrs, (LV) Abstract: The target goal of this work is to develop a methodology of forecasting Latvian GDP using ARMA (AutoRegressive-Moving-Average)

More information

This time it is different! Or not? Discounting past data when predicting the future

This time it is different! Or not? Discounting past data when predicting the future This time it is different! Or not? Discounting past data when predicting the future Philip Hans Franses Eva Janssens Econometric Institute Erasmus School of Economics EI2017-25 Abstract We employ a simple

More information

Stata tip 63: Modeling proportions

Stata tip 63: Modeling proportions The Stata Journal (2008) 8, Number 2, pp. 299 303 Stata tip 63: Modeling proportions Christopher F. Baum Department of Economics Boston College Chestnut Hill, MA baum@bc.edu You may often want to model

More information

Econ 424 Time Series Concepts

Econ 424 Time Series Concepts Econ 424 Time Series Concepts Eric Zivot January 20 2015 Time Series Processes Stochastic (Random) Process { 1 2 +1 } = { } = sequence of random variables indexed by time Observed time series of length

More information

IDENTIFYING BUSINESS CYCLE TURNING POINTS IN CROATIA

IDENTIFYING BUSINESS CYCLE TURNING POINTS IN CROATIA IDENTIFYING IN CROATIA Ivo Krznar HNB 6 May 2011 IVO KRZNAR (HNB) 6 MAY 2011 1 / 20 WHAT: MAIN GOALS Identify turning points of croatian economic activity for the period 1998-(end) 2010 Provide clear and

More information

Univariate Nonstationary Time Series 1

Univariate Nonstationary Time Series 1 Univariate Nonstationary Time Series 1 Sebastian Fossati University of Alberta 1 These slides are based on Eric Zivot s time series notes available at: http://faculty.washington.edu/ezivot Introduction

More information

Predicting bond returns using the output gap in expansions and recessions

Predicting bond returns using the output gap in expansions and recessions Erasmus university Rotterdam Erasmus school of economics Bachelor Thesis Quantitative finance Predicting bond returns using the output gap in expansions and recessions Author: Martijn Eertman Studentnumber:

More information

ECON3327: Financial Econometrics, Spring 2016

ECON3327: Financial Econometrics, Spring 2016 ECON3327: Financial Econometrics, Spring 2016 Wooldridge, Introductory Econometrics (5th ed, 2012) Chapter 11: OLS with time series data Stationary and weakly dependent time series The notion of a stationary

More information

Vector Auto-Regressive Models

Vector Auto-Regressive Models Vector Auto-Regressive Models Laurent Ferrara 1 1 University of Paris Nanterre M2 Oct. 2018 Overview of the presentation 1. Vector Auto-Regressions Definition Estimation Testing 2. Impulse responses functions

More information

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω ECO 513 Spring 2015 TAKEHOME FINAL EXAM (1) Suppose the univariate stochastic process y is ARMA(2,2) of the following form: y t = 1.6974y t 1.9604y t 2 + ε t 1.6628ε t 1 +.9216ε t 2, (1) where ε is i.i.d.

More information

Chapter 4: Models for Stationary Time Series

Chapter 4: Models for Stationary Time Series Chapter 4: Models for Stationary Time Series Now we will introduce some useful parametric models for time series that are stationary processes. We begin by defining the General Linear Process. Let {Y t

More information

Lab 11 - Heteroskedasticity

Lab 11 - Heteroskedasticity Lab 11 - Heteroskedasticity Spring 2017 Contents 1 Introduction 2 2 Heteroskedasticity 2 3 Addressing heteroskedasticity in Stata 3 4 Testing for heteroskedasticity 4 5 A simple example 5 1 1 Introduction

More information

VAR Models and Applications

VAR Models and Applications VAR Models and Applications Laurent Ferrara 1 1 University of Paris West M2 EIPMC Oct. 2016 Overview of the presentation 1. Vector Auto-Regressions Definition Estimation Testing 2. Impulse responses functions

More information

Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting)

Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting) Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting) (overshort example) White noise H 0 : Let Z t be the stationary

More information

TREND ESTIMATION AND THE HODRICK-PRESCOTT FILTER

TREND ESTIMATION AND THE HODRICK-PRESCOTT FILTER J. Japan Statist. Soc. Vol. 38 No. 1 2008 41 49 TREND ESTIMATION AND THE HODRICK-PRESCOTT FILTER Andrew Harvey* and Thomas Trimbur** The article analyses the relationship between unobserved component trend-cycle

More information