# econ 4160: econometrics{modelling and systems ?· econ 4160: econometrics{modelling and systems...

Post on 09-Sep-2018

212 views

Embed Size (px)

TRANSCRIPT

Outline Data sets Review of some elementary econometrics The test battery Some first Monte Carlos Testing parameter stability

ECON 4160: EconometricsModelling andSystems Estimation:

Computer Class # 2

Andre K. Anundsen

Norges Bank

September 10, 2014

ECON 4160: Computer Class Norges Bank

Outline Data sets Review of some elementary econometrics The test battery Some first Monte Carlos Testing parameter stability

Practical information

Who am I? Andre K. Anundsen (Researcher at Norges Bank)Email: andre-kallak.anundsen@norges-bank.noResponsible for the rest of the CPU classes

ECON 4160: Computer Class Norges Bank

Outline Data sets Review of some elementary econometrics The test battery Some first Monte Carlos Testing parameter stability

Outline

Data sets

Review of some elementary econometrics

The test battery

Some first Monte Carlos

Testing parameter stability

ECON 4160: Computer Class Norges Bank

Though the teaching plan also says that we will cover NLS,encompassing tests and vector autoregressive (VAR) models today,we wont have time!!! But, dont despair; we shall (try to) findtime for all these topics in another CC (specification and estimationof VAR models will be covered in detail already in the next class)!!

ECON 4160: Computer Class Norges Bank

Data sets for today (posted on the web page):

I KonsDataSim.zip (same as you used last time)

ECON 4160: Computer Class Norges Bank

Regression with experimental and non-experimental data

Consider the modelling task with experimental/lab data:

Yiresult

= g(Xi )input

+ vishock

(1)

and compare with the situation with non-experimental, real-worlddata:

Yiobserved

= f (Xi )explained

+ iremainder

(2)

ECON 4160: Computer Class Norges Bank

Clearly, we know much less about the match between f (Xi ) and Yiin the non-experimental case: We simply cant control the inputand then study the output. Often, we may not even know allvariables that are included in the vector Xi ! All our choices offunctional form, f (), and explanatory variables, Xi , will bereflected in the remainder i :

i = Yi f (Xi ) (3)

However, we will follow custom and refer to i as the disturbance,and the estimated counterpart, i , as the residual.

ECON 4160: Computer Class Norges Bank

When we choose regression, the f (Xi ) function is the conditionalexpectation:

f (Xi ) = E (Yi |Xi ) (4)

and it follows that

E ( i |Xi ) = E ((Yi f (Xi ))|Xi ) = 0 (5)

I But if E (Yi |Xi ) is incomplete or wrong relative to the DGP, iwill in general be correlated with omitted variables

I The assumptions that we make about the disturbances , e.g.,the classical assumptions in applied modelling, are onlytentative, and we need to validate them after estimation

I This is called residual mis-specification testing

ECON 4160: Computer Class Norges Bank

Residual mis-specification overview

Disturbances i are:Xi heteroscedastic autocorrelated

1 Var(1) 1 Var(1)

exogenousunbiased

consistentwrong

unbiased

consistentwrong

predeterminedbiased

consistentwrong

biased

inconsistentwrong

ECON 4160: Computer Class Norges Bank

Test battery in PcGive I: Non-normalityNormality, Jarque and Bera (1980): (Note: Small samplecorrection in PcGive)Test the joint hypothesis of no skewness and no excess kurtosis(3rd and 4th moment of the normal distr.):

JB =n

6

(Skewness2 +

1

4Excess kurtosis2

)(6)

The sample skewness and excess kurtosis (skewness = 0 andkurtosis = 3 for normal distr.) are defined as follows

Skewness =1n

ni=1 ( i )

3(1n

ni=1 ( i )

2) 3

2

=1n

ni=1

3i(

1n

ni=1

2i

) 32

(7)

Excess kurtosis =1n

ni=1 ( i )

4(1n

ni=1 ( i )

2) 4

2

=1n

ni=1

4i(

1n

ni=1

2i

)2 (8)Null is normality.

ECON 4160: Computer Class Norges Bank

Test battery in PcGive II: HeteroskedasticityHeteroskedasticity, White (1980):Auxiliary regression:

2i = 0 + 1Xi + 2X2i + ui (9)

Test that 1 = 2 = 0 against non-zero using an F-test.Hetero X (two or more regressors), White (1980)Auxiliary regression:

2i = 0 + 1Xi + 2Zi + 3XiZi + 4X2i + 5Z

2i + ui (10)

Test that 1 = 2 = 3 = 4 = 5 = 0 against non-zero using anF-test.In both cases the null is homoskedasticity.

ECON 4160: Computer Class Norges Bank

Test battery in PcGive III: Autocorrelation

Autocorrelation, Godfrey (1978):Auxiliary regression (note, i is now time unit! Call it t):

t = 0 +p

i=1

i ti + p+1Xt + ut (11)

A test for pth order autocorrelation is then to test that1 = 2 = = p = 0 against non-zero using an F-test.Null is no autocorrelation.

ECON 4160: Computer Class Norges Bank

Test battery in PcGive IV: Autoregressive conditionalheteroskedasticity

ARCH, Engle (1982):Auxiliary regression:

t = 0 +p

i=1

i 2ti + ut (12)

A test for pth order ARCH is then to test that1 = 2 = = p = 0 against non-zero using an F-test.Null is no ARCH.

ECON 4160: Computer Class Norges Bank

Test battery in PcGive V: Regression Specification Test

RESET, Ramsey (1969):Auxiliary regression (Note 2,3 in PcGive means squares andcubes!):

t = 0 + 1Xt + 2Y2t + 3Y

3t + ut (13)

A test for correct specification is then to test that 2 = 3 = 0against non-zero using an F-test.Null is no specification error.

ECON 4160: Computer Class Norges Bank

Open KonsDataSim.in7 and use Single-equation dynamicmodelling under Models for time series data in PcGive toestimate a simple static model between consumption (C) andincome (I). Do the residuals appear to be well behaved?

ECON 4160: Computer Class Norges Bank

What is Monte Carlo simulation? I

Say that the process that has generated the data (the datagenerating process, or the DGP) takes the following form:

yt = 0 + 1xt + t (14)

where t is WN. Now, assume that we had some data for theperiod t = 1, . . . ,T on yt and xt , and that we want to pin down0 and 1 (our parameters of interest)

As long as Cov(xt , t) = 0, you know that the OLS estimator isBLUE! How could we confirm this by simulation?

ECON 4160: Computer Class Norges Bank

What is Monte Carlo simulation? II

1. Fix 0 and 1 in (14) at some values, e.g. 0 = 2 and1 = 1.5

2. Generate some numbers for the time series xt on a samplet = 1 . . . ,T

3. Assume e.g. that t N(0, 1), and draw T numbers fromthe standard normal distribution

4. Then, the time series yt for the sample t = 1, . . .T will followby definition from the DGP!

5. Estimate an equation of the form (14) by OLS and collectyour 0 and 1 estimates; call them

10 and

11

6. Now, repeat the steps 15 M times, and calculate

MC0 =Mm=1 m0

M and MC1 =

Mm=1 m1M !

ECON 4160: Computer Class Norges Bank

What is Monte Carlo simulation? III

As we have seen, MC0 and MC1 are nothing but the mean

estimates obtained by repeating 15 M times. From the law oflarge numbers, we know that MC0 and

MC1 converge to E (0)

and E (1) as M .

But then, we know that a measure of the biases of these estimateswould be: MC0 0 and MC1 1. What we can also do is toconsider a recursive Monte Carlo, where we e.g. vary the samplesize from say T = 20 to T = 500 in increments of 20 to check thebias of the OLS estimator for different samples!

ECON 4160: Compu

Recommended