• No results found

Econometrics I: Econometric Methods

N/A
N/A
Protected

Academic year: 2021

Share "Econometrics I: Econometric Methods"

Copied!
43
0
0

Loading.... (view fulltext now)

Full text

(1)

Econometrics I: Econometric Methods

J ¨urgen Meinecke

Research School of Economics, Australian National University

24 May, 2016

(2)

Housekeeping

Assignment 2 is now history

The ps tute this week will go through selected exercises from this year’s midterm exam

There will be regular computer tutes this week as well

(3)

Consultation times weeks 14 and 15

Exclusively at the following days/times/locations:

I May 31 from 10-12, Arndt 1022 (Juergen)

I June 6 from 10-12, Arndt 1022 (Juergen)

I June 7 from 10-12, CBE (26c) tutorial room 1

I June 10 from 10-12, CBE (26c) tutorial room 1

Note: no other consultation is offered!

(4)

Assignment 2 and Participation Marks

We will publish your marks for assignment 2 and your tutorial participation on Wattle before the final exam

How can you receive your assignment back?

I after we post the assignment 2 marks on Wattle you can collect your assignment from the same place where you dropped it: the EMET2007 assignment box on the first floor of the Arndt building

(only this time the little door will be unlocked!)

(5)

Student Course Evaluations

Please take time to submit course evaluations for EMET2007 Any feedback is appreciated!

It would be great if you could give constructive feedback (even if you did not enjoy the course very much)

What did you like about the course?

What did you not like about the course?

What did you think of the ps tutes and the computer tutes?

How could I improve the course? What should I do differently?

Your feedback DOES matter!

(6)

After EMET2007, we offer four more econometrics courses for undergraduate students

I two of these do micro-econometrics (like we did during weeks 1-10)

I the other two do macro-econometrics (like we did during weeks 11-13)

(7)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics Time Series Regression and Forecasting

Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(8)

EMET3004: Econometric Modelling (S2)

I formerly EMET2008

I continuation of EMET2007

I take a deeper look at issues such as causality, omitted variables bias and functional form specifications EMET 3006: Applied Microeconometrics (S1)

I Studies methods and models with a focus on applications You do NOT need to take EMET3004 to take EMET3006 (or vice versa)!

(9)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics Time Series Regression and Forecasting

Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(10)

EMET3007: Business and Economic Forecasting (S2)

I Starts with data ’cleaning’ exercises such as smoothing and detrending

I Takes a closer look at autoregressive models

I Study different methods of forecasting

EMET3008: Applied Macro and Financial Econometrics (S2)

I Model several time series simultaneously in ’system’

estimation

I Develop particular types of time series model used to study macroeconomic equilibria

I Use macro and financial data to fit model and analyze forecast performance

Both these courses will (likely) NOT use Stata but some other programming environment (example, Eviews or Matlab)

(11)

After taking EMET2007, EMET3004 and EMET3006 you would have a solid understanding of the methods and models used for micro-econometrics

After taking EMET2007, EMET3007 and EMET3008 you would have a solid understanding of the methods and models used for macro and time series econometrics

(12)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics

Time Series Regression and Forecasting Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(13)

We have studied the AR(p) model

Yt =β0+αt+β1Yt1+β2Yt2+ · · · +βpYtp+ut and we have studied the ADL(p,r) model

Yt =β0+αt+ +β1Yt1+β2Yt2+ · · · +βpYtp

+γ1Xt1+γ2Xt2+ · · · +γrXtr+ut

which is a straightforward extension of the AR(p) model, all we do is add another regressor

(14)

We would like to use the two models to produce forecasts for the time series Yt

But we need to be careful:

You can only estimate AR(p) models and ADL(p,r) models when the time series Ytand Xtare stationary

If they are not stationary, then we run into the problem of spurious correlation

Or do you really believe in the stork?

(15)

Stationary time series have probability distributions that do not change over time

Intuitively, this means that you can use past observations of the time series to make predictions for the future

If a time series is not stationary, then it does not make sense to use past observations and pretend like they could be used to predict the future

(16)

When are time series non-stationary?

Trends: persistent, long-term movement or tendency Two types of trend lead to non-stationary time series:

I deterministic

(relatively easy to spot in a time series graph,

example: real GDP as seen during the computer tutorials)

I stochastic

(almost impossible to spot in a time series graph, see next slide)

(17)

Four realizations from the same random walk process

(18)

Random walks follow stochastic trends but they do not always look like they are following an obvious trending behavior Luckily, Dickey and Fuller came up with a reasonably easy statistical test for stochastic trends

To test if a time series Ytfollows a stochastic trend, we only need to test the coefficient δ in the model:

∆Yt= β0+α·t+δYt1+γ1∆Yt1+γ2∆Yt2+ · · · +γp∆Ytp+ut,

Recall that δ≤0

If δ is sufficiently far away from zero (as measured relative to the critical values provided by Dickey and Fuller) then we reject the null hypothesis of a stochastic trend

(19)

We use the following terms interchangeably:

I stochastic trend

I unit root

I non-stationary

(20)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics

Time Series Regression and Forecasting Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(21)

Suppose I give you a time series Ytand ask you to produce forecasts, what should you do?

Let’s try to tie up all loose ends and come up with some practical advice

Given the time series Yt, here’s what you should do to produce the best forecast. . .

(22)

I Graph it

Sometimes you can spot deterministic trends in graphs (e.g., GDP)

A graph will definitely not help you spot a stochastic trend

I Run an ADF unit root test on Yt

(possibly use AIC to set optimal lag length)

(23)

I If you reject the null hypothesis of a unit root:

Estimate the AR(p) model for Yt:

Yt= β0+αt+β1Yt1+β2Yt2+ · · · +βpYtp+ut (It’s always safe to include a deterministic time trend) You can easily estimate this in Stata and it is safe to take the Stata output of standard errors, t-statistic, p-values and confidence intervals at face value

Use the AR(p) model for Ytto produce your forecasts

(24)

I If you cannot reject the null hypothesis of a unit root:

Generate first differences∆Ytof the data and run a unit root test on∆Yt

In 90% of practical situations, you will reject the null hypothesis of a unit root in∆Yt(in other words, first differencing effectively removes the unit root)

This suggests that you should use an AR(p) model for∆Yt:

∆Yt =β0+αt+β1∆Yt1+β2∆Yt2+ · · · +βp∆Ytp+ut Since∆Ytis stationary, you can easily estimate this in Stata and it is safe to take the Stata output of standard errors, t-statistic, p-values and confidence intervals at face value Use the AR(p) model for∆Ytto produce your forecasts

(25)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics

Time Series Regression and Forecasting Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(26)

During the last two weeks I have used inflation as the running example to illustrate important concepts

Recall that we defined inflation to be inflt:=400· (log(cpit) −log(cpit1))

(this is the annualized version of quarter-to-quarter inflation;

but it would work just the same if we hadn’t used the annualized version)

Our goal:

Come up with the best AR(p) model to forecast inflation Let’s go through the steps

(27)

Graphing the data

Deterministic trend: not obvious Stochastic trend: never obvious

(28)

Test for unit root

dfuller infl, lags(2) trend

Augmented Dickey-Fuller test for unit root Number of obs = 224

--- Interpolated Dickey-Fuller --- Test 1% Critical 5% Critical 10% Critical

Statistic Value Value Value

---

Z(t) -3.086 -3.999 -3.433 -3.133

--- MacKinnon approximate p-value for Z(t) = 0.1097

(I have determined that the optimal lag length is 2) Dickey Fuller critical value is -3.41

(allowing for deterministic time trend here) Cannot reject the null hypothesis of unit root here

(29)

Cannot estimate an AR(p) model for inflt

Let’s take first differences to remove unit root:

∆inflt :=inflt−inflt1

Let’s convince ourselves that∆inflthas indeed no unit root. . .

(30)

Test for unit root

dfuller Dinfl, lags(4) trend

Augmented Dickey-Fuller test for unit root Number of obs = 221

--- Interpolated Dickey-Fuller --- Test 1% Critical 5% Critical 10% Critical

Statistic Value Value Value

---

Z(t) -8.931 -4.000 -3.434 -3.134

--- MacKinnon approximate p-value for Z(t) = 0.0000

(I have determined that the optimal lag length is 4) Dickey Fuller critical value is -3.41

(allowing for deterministic time trend here) Do reject the null hypothesis of unit root here

(31)

Therefore, our best time series model is this one:

∆inflt =β0+αt+β1∆inflt1+β2∆inflt2

+β3∆inflt3+β4∆inflt4+ut Let’s estimate it. . .

(32)

regress L(0/4).Dinfl yearqrt, robust

Linear regression Number of obs = 222

F( 5, 216) = 11.03 Prob > F = 0.0000 R-squared = 0.2092 Root MSE = 1.8898

---

| Robust

Dinfl | Coef. Std. Err. t P>|t| [95% Conf. Interval]

---+--- Dinfl |

L1. | -.3692247 .0672725 -5.49 0.000 -.5018193 -.2366302 L2. | -.4021147 .065175 -6.17 0.000 -.5305751 -.2736543 L3. | -.0538849 .101832 -0.53 0.597 -.2545965 .1468268 L4. | -.158153 .075199 -2.10 0.037 -.3063708 -.0099352

|

yearqrt | -.0008346 .002153 -0.39 0.699 -.0050782 .003409 _cons | .0704911 .2096899 0.34 0.737 -.3428092 .4837913 ---

(33)

What should we do with these estimates now?

Remember that our main goal is to produce forecasts The data set runs from 1957Q1 to 2013Q4

Let’s produce an inflation forecast for 2014Q1 All we need to do is use a bit of common sense

(34)

In the data we get the following values:

∆infl2013Q1 = −0.738

∆infl2013Q2 = −1.453

∆infl2013Q3 =2.622

∆infl2013Q4 = −1.747

Obtain forecast by plugging into the estimated model:

∆infl[2014Q1|2013Q4 =0.070−0.001·229

−0.369· (−1.747) −0.402· (2.622)

0.054· (−1.453) −0.158· (−0.738)

= −0.373

The forecast for the change in the annualized quarterly inflation rate for 2014Q1 is -0.373

(35)

If we are not interested in the change but instead want to learn about the level of inflation in 2014Q1:

From the data: infl2013Q4 =0.847 Therefore

inflc2014Q1|2013Q4=0.847+ [∆infl2014Q1|2013Q4

=0.847−0.373

=0.474

(36)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics

Time Series Regression and Forecasting Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(37)

The inflation data runs from 1957Q1 to 2013Q4

To measure forecast performance, we could follow this little algorithm:

1. pretend like your data already ends in s=2005Q1 2. estimate an AR(4) model for∆infltfor

the time frame 1957Q1 to s

3. calculate a forecast for period s+1:inflcs+1|s

4. compare the forecast to the actual realization infls+1; difference is the forecast error:infls+1−inflcs+1|s 5. shift s up by one period an jump back to step 2

(repeat until you reach end of your data set(s≤T)

(38)

Doing this in Stata is not easy

In fact, Stata is not really made for this

Stata is strong for micro-econometrics but not for macro-econometrics

Nevertheless, I have implemented this algorithm in Stata and ran it over the inflation data

Here’s the output in two pictures. . .

(39)

Inflation: actual versus forecast

(40)

Forecast error

(41)

Is this a good model or a bad model?

Hard to tell on its own

Could try different AR(p) models Even better: try an ADL(p,r) model

Bottom line: there are a lot of possible time series models out there

This simple AR(4) model already does a reasonable job And it took you only three weeks to understand!

(42)

Roadmap

Introduction

Econometrics Pathways Microeconometrics

Macroeconometrics/Time Series Econometrics Time Series Regression and Forecasting

Recap

Practical Guidelines for Time Series Analysis Example: CPI and Inflation

Pseudo Out-of Sample Forecasts One Last Thing

Last Slide

(43)

Last Slide (yey!)

I hope you . . .

I . . . enjoyed it a bit

(didn’t hate it too much!?)

I . . . learned something useful

I . . . consider doing more econometrics

Feel free to come by my office for a chat anytime!

Good luck with all your exams!

References

Related documents

This may include security guard patrols, electronic surveillance and security alarms, lockdown devices designed for computers and other equipment, and security grills on

This begs the question, does the differences in enterprise management approaches by male and female entrepreneurs necessarily translate into different

The incentive effects of different tax depreciation rules combined with the corporate tax rate on firms’ investment decisions can be compared on the basis of the net present value

In vivo studies with these two human breast can- cer cell lines confirm that LHRH receptors on TNBC can be successfully targeted with the cytotoxic LHRH.. analog,

The association fostered and nourished the student training program until 1940 when two student dietitian training programs were formed in Portland: the University of Oregon

The close to balance or in surplus (CBS) rule of budgetary discipline makes the smoothing of cyclical fluctuations in the short-term via automatic stabilisers compatible with the

For example, The Economics of Ecosystems & Biodiversity foundations ( TEEB, 2010 ) proposed “maintenance of life cycles of migratory species” as an ecosystem service,

DUODOPA ® is a gel that is delivered continuously throughout the day with a pump via a tube, directly into the small intestine to provide more constant amounts of levodopa