Вы находитесь на странице: 1из 38

Macroeconometrics

Congruency: Residual Properties, Parameter Constancy, Predictive Failure

Jaime Marquez
SAIS

Spring 2015

Jaime Marquez (SAIS)

Spring 2015

1 / 35

Anatomy of an equation
Pretend that economic theory shows that imports today depend on todays
income and nothing else
mt = 0 + 1 yt + ut =

yt

0
1

+ ut = xt + ut

m is the log of real imports


y is the log of real GDP

This equation assumes that


the residuals are normal, serially independent, and homoskedastic
all the 0 s are constant
there is not predictive "failure"
xt can be taken as given for parameter estimation (later in the course)

Parameter estimates rest on these assumptions


If we cannot reject these assumptions, then model is congruent
Congruency is a necessary, but not su cient, condition for useful inferences
Key reading is DH-I 18: Model Evaluation Statistics
Jaime Marquez (SAIS)

Spring 2015

2 / 35

H:\Teaching\Spring 2015\Macroeconometrics\Engle-Granger-USimports.out 02/13/15 14:47:25


ImportsUS.in7 loaded from H:\Teaching\Spring 2015\Macroeconometrics\ImportsUS.in7
Algebra loaded from H:\Teaching\Spring 2015\Macroeconometrics\USImports.alg
Algebra code for ImportsUS.in7:
y = log(real_gdp);
m = log(real_imports);
PM = (nom_imports*100/real_imports)*(1+Tariff_Rate/100);
PY = nom_gdp *100 / real_gdp;
RPM =
PM / PY;
rpm = log(RPM);
Ypercapita = real_gdp/(population/10^9);
Mpercapita = real_imports / (population/10^9);
M_yshr = nom_imports *100 /nom_gdp;
ypcapita = log(Ypercapita);
mpcapita = log(Mpercapita);
Dy = diff(y,1);
Dm = diff(m,1);
Dypcapita = diff(ypcapita,1);
Dmpcapita = diff(mpcapita,1);
Drpm = diff(rpm,1);

Engle-Granger Cointegration

Ox Professional version 7.00 (Windows_64/U/MT) (C) J.A. Doornik, 19942013


PcGive 14.0B3 session started at

7:39:33 on 12022015

EQ( 1) Modelling m by OLS


The dataset is: H:\Teaching\Spring 2015\Macroeconometrics\ImportsUS.in7
The estimation sample is: 1929 2013
Constant
y

Coefficient
7.21714
1.52355

sigma
R^2
Adj.R^2
no. of observations
mean(m)

0.2884
0.956875
0.956355
85
5.57119

Std.Error
0.2996
0.03550

tvalue
24.1
42.9

m =
(SE)

F(2,81)
F(1,83)
Chi^2(2)
F(2,82)
F(2,82)
F(2,81)

=
=
=
=
=
=

P-value
345.95
246.74
26.120
86.436
86.436
461.84

[0.0000]**
[0.0000]**
[0.0000]**
[0.0000]**
[0.0000]**
[0.0000]**

Tests of Residuals' Properties

7.2 + 1.5*y
(0.3) (0.036)

Solved static longrun equation for m


Coefficient Std.Error
Constant
7.21714
0.2996
y
1.52355
0.03550
Longrun sigma = 0.2884

tvalue
24.1
42.9

ECM = m + 7.21714 1.52355*y;


WALD test: Chi^2(1) = 1841.62 [0.0000] **
residuals [1929 2013] saved to ImportsUS.in7

Page: 1 of 2

Assumed long-run relation

RSS
6.90347459
F(1,83) =
1842 [0.000]**
loglikelihood
13.9082
no. of parameters
2
se(m)
1.38047

Instability tests:
variance
2.7717**
joint
8.0510**
Individual instability tests:
Constant
1.7011**
y
2.0427**
AR 12 test:
ARCH 11 test:
Normality test:
Hetero test:
HeteroX test:
RESET23 test:

tprob Part.R^2
0.0000
0.8748
0.0000
0.9569

tprob
0.0000
0.0000

H:\Teaching\Spring 2015\Macroeconometrics\Engle-Granger-USimports.out 02/13/15 14:47:25

Descriptive Statistics 1.01 session started at

7:45:23 on 12022015

Testing whether residuals are stationary


Unitroot tests
The dataset is: H:\Teaching\Spring 2015\Macroeconometrics\ImportsUS.in7
The sample is: 1940 2013 (85 observations and 1 variables)
residuals: ADF tests (T=74, Constant+Trend; 5%=3.47 1%=4.09)
Dlag
tadf
beta Y_1
sigma
tDY_lag tprob
AIC
10
4.265**
0.79937 0.05352
1.208 0.2316
5.697
9
4.228**
0.80040 0.05372
0.5952 0.5539
5.701
8
4.244**
0.80068 0.05344
0.6302 0.5308
5.722
7
4.259**
0.80092 0.05319
1.717 0.0909
5.743
6
4.171**
0.80215 0.05398
0.1266 0.8997
5.725
5
4.203**
0.80217 0.05357
0.4310 0.6678
5.752
4
4.238**
0.80175 0.05325
0.5224 0.6031
5.776
3
4.406**
0.79775 0.05296
1.117 0.2681
5.799
2
4.383**
0.79845 0.05306
1.571 0.1208
5.808
1
4.808**
0.78228 0.05361
0.1420 0.8875
5.800
0
4.852**
0.78292 0.05324
5.826

Page: 2 of 2

Fprob
0.2316
0.4085
0.5337
0.2874
0.4093
0.5096
0.5909
0.5613
0.4294
0.5158

Properties of the Residuals

For relevant statistical inference, the residuals need to satisfy


Serially independence
Homoskedasticity
Normality

Jaime Marquez (SAIS)

Spring 2015

4 / 35

Properties of the Residuals: Serial Independence

The term ut is serially independent if


E (ut ut s ) = 0 for all s
The test for serial independence uses the following regression:
u
bt = 1 u
bt 1 + 2 u
bt 2 +

and test the null hypothesis that

1 = 2 =

+ n ubt

= n = 0

If we cannot reject this hypothesis, then residuals areserially independent


PcGive automatically prints this test under the heading of AR(n)

Jaime Marquez (SAIS)

Spring 2015

5 / 35

Fitted

The estimation sample is: 1929 - 2013

m = - 7.2 + 1.5*y
(SE) (0.3) (0.036)

6
5
4
3
1930
2

1940

1950

1960

1970

1980

1990

2000

2010

2000

2010

r:m (scaled)

AR 1-2 test:

F(2,81) = 345.95 [0.0000]**

-1
1930

1940

Jaime Marquez (SAIS)

1950

1960

1970

1980

1990

Spring 2015

6 / 35

Properties of the Residuals: Homoskedasticity


The term ut is homoskedastic if
E (ut2 ) = 2u
There are several tests of homoskedasticity
Focus here is on the Autoregressive Conditional Heteroskedasticity ARCH:
2ut = 0 + 1 2u,t 1 +

+ n 2t

The equation says that the variance today depends on the variance in the past
Glitch: we do not have data on 2ut
Then the test uses
u
bt2 = 0 + 1 u
bt2 1 +

and test the null hypothesis that

1 = 2 =

+ n ubt2

= n = 0

If we cannot reject this hypothesis, then the residuals arehomoskedastic


PcGive automatically prints this test under the heading of ARCH(n )
Jaime Marquez (SAIS)

Spring 2015

7 / 35

0.40

residsqrd

The estimation sample is: 1929 - 2013

0.35

m = - 7.2 + 1.5*y
(SE) (0.3) (0.036)

0.30

0.25

residsqrd = + 0.82*residsqrd_1 + 0.012


(SE)
(0.052)
(0.0062)

0.20

ARCH 1-1 test:

F(1,83) = 246.74 [0.0000]**

0.15

0.10

0.05

1930

1940

Jaime Marquez (SAIS)

1950

1960

1970

1980

1990

2000

2010

Spring 2015

8 / 35

Properties of the Residuals: Normality

The disturbance ut is treated as normally distributed if the empirical


distribution of u
bt satises two properties of the normal distribution: there is
no skewness and no excess kurtosis
The normal distribution has a skewness of zero. So if the distribution of u
bt
has skewness, then it is not symmetric and therefore it is not normal

Kurtosis is the degree of concentration of observations around the mean. The


kurtosis of the normal distribution is 3. So we test the "excess" kurtosis
It turns out (DH-I 18.5.4) that the skewness and the excess kurtosis are two
independent 2 (1) so their sum is 2 (2)
PcGive automatically prints this test under the heading of NORMAL

Jaime Marquez (SAIS)

Spring 2015

9 / 35

Density

The estimation sample is: 1929 - 2013

residuals

m = - 7.2 + 1.5*y
(SE) (0.3) (0.036)

2.00

Normality test: Chi^2(2) = 26.120 [0.0000]**

1.75
1.50
1.25
1.00
0.75
0.50
0.25

-0.6

-0.5

-0.4

Jaime Marquez (SAIS)

-0.3

-0.2

-0.1

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Spring 2015

10 / 35

Parameter Constancy
Given
mt = 0 + 1 yt + ut =

yt

0
1

+ ut = xt + ut

Do parameter estimates change when the estimation sample dates change?


estimate with an initial sample
add one observation and re-estimate
continue until the full sample is used for parameter estimation

Subsample

Dates

Estimate

Std. Error

1929-1939
1929-1940
1929-2013

1
2
75

b
1
b
2
b

stder(b
1 )
stder(b
2 )
b
stder( 75 )

75

0
Plot evolution of the 95% condence band of the b
i s for each subsample:
Jaime Marquez (SAIS)

b
i

2 stder (b
i ), i = 1, 2, ..., 75

Spring 2015

11 / 35

2.5

Constant

+/-2SE

0.0

Estimates based on all the data


m = - 7.2 + 1.5*y
(SE) (0.3) (0.036)

-2.5
-5.0
-7.5
1940

1950

1960

1970

1980

1990

2000

2010

y +/-2SE

1.5

1.0
95% confidence band for slope
using data throug 1980

0.5

1940

1950

Jaime Marquez (SAIS)

1960

1970

1980

1990

2000

2010

Spring 2015

12 / 35

Forecasting: General Considerations

Forecasting is an important application of Macroeconometrics


Policy institutions generate forecasts for macroeconomic aggregates
The IMFs World Economic Outlook
The Federal Open Market Committee
The Congressional Budget O ce

Private business also forecast frequently

Jaime Marquez (SAIS)

Spring 2015

13 / 35

Figure 1. Central tendencies and ranges of economic projections, 201417 and over the longer run

Percent

Change in real GDP


Central tendency of projections
Range of projections

Actual

+
0
-

2009

2010

2011

2012

2013

2014

2015

2016

2017

Longer
run
Percent

Unemployment rate

10
9
8
7
6
5

2009

2010

2011

2012

2013

2014

2015

2016

2017

Longer
run
Percent

PCE inflation

2009

2010

2011

2012

2013

2014

2015

2016

2017

Longer
run

Note: Definitions of variables are in the general note to the projections table. The data for the actual values of
the variables are annual.

Predictive Failure DH-I 15.7


Predictive failure refers to the models inability to predict the data outside
the estimation sample
Suppose we use
mt = 0 + 1 yt + ut =

yt

0
1

+ ut = xt + ut

Estimate the parameters from 1929 to 1963 and predict y for all dates 1963
m
b t = xt b
, t = 1964...2013

We want accurate predictions

But we know that we get forecast errors


We want to know whether the error we get is "too" large
Large relative to the range of values one can reasonably expect
So we need the expectation and variance of the forecast error
Jaime Marquez (SAIS)

Spring 2015

15 / 35

Forecast Error
The forecast error is
et = mt

m
b t = [ xt + u t ]

What are the sources of forecast error?


1

xt + u t

Parameters need to be estimated


Estimation is not guaranteed to deliver the true values

Model uncertainty: The value of disturbance u is unknown


1
2

i h
xt b
=

Parameter uncertainty: We do not know the true values of the parameters


1

change of policies at home or abroad


weather developments

The explanatory variable is measured with error


1
2

data revisions for the current quarter


vintages

Jaime Marquez (SAIS)

Spring 2015

16 / 35

Derivation of Condence Bands

Goal: condence interval for the forecast error to see if it is toolarge


0
The forecast error is random because it depends on b
s and u 0 s - we ignore
measurement error in x
If we had the variance of the forecast error, F t , then the rule is
The forecast error is within the bounds of condence if
2Ft < mt

m
b t < +2Ft

or the forecast error is outside the bounds of condence if


mt
mt

m
bt

m
bt

<
>

2Ft
+2Ft

So what we need now is to construct a measure of F t

Jaime Marquez (SAIS)

Spring 2015

17 / 35

The expectation of mt

E (mt

m
b t is

6
7
m
b t ) = 4 xt + E ( u t ) 5
| {z }
=0

If E (b
) = , then
The variance of mt
var (mt

E (mt
m
b t is

m
bt)

m
b t ) = [ xt ]

= E [(mt

Jaime Marquez (SAIS)

m
b t )]

xt E (b
)

[ xt ] = 0

= 2F = E [(mt

= E [(mt

m
bt)

E (mt m
b t ) ]2
{z
}
|

E (mt )) + (E (mt )

m
b t )]2
Spring 2015

18 / 35

After a fair amount algebraic gymnastics, we get


2F

= E [mt
= 2 + 2y

2 = E [yt

E (m
b t )]2 + E [E (m
bt)

m
b t )]2

E (yt )]2 : Model uncertainty due to the disturbance u

2y = E [E (yt ) ybt )]2 : Parameter uncertainty due to using parameter


estimates instead of true values

PcGive gives you the option of using 2 or both 2 and 2y

Jaime Marquez (SAIS)

Spring 2015

19 / 35

Condence Bands

Once we get the variance of the forecast error, F t , then the rule we follow is
The forecast is within the bounds of condence if
2F t < mt
which can re-written as
m
bt

m
b t < +2F t

2F t < mt < m
b t + 2F t

The forecast is outside the bounds of condence if


mt
mt

Jaime Marquez (SAIS)

< m
b t 2F t
> m
b t + 2F t
Spring 2015

20 / 35

Types of Forecasts

Ex-post: data for forecast drivers are known from history


Ex-ante: data for forecast drivers are not known; forecaster has to provide
values for the forecast drivers
1-period ahead: values for the drivers come from historical data including
values for lags of the dependent variable
s-period ahead: the model uses its own predictions for lags of the dependent
variable

Jaime Marquez (SAIS)

Spring 2015

21 / 35

Ex-post forecasts

Model
yt = + xt + yt 1 + u t
We have data for yt and xt for t = 1, ..., T from history
We want to assess how good the model predicts outside the estimation
sample
Estimate the parameters using N < T observations.
Generate forecasts from h = N + 1 to T
Set the disturbance to zero

Jaime Marquez (SAIS)

Spring 2015

22 / 35

Ex-post forecasts: 1-period ahead


Predictions use historical data including values for lags of the dependent
variable
The forecast for h = 1 is
b yN , h = 1...T
ybN +1 = b
+b
xN + 1 +

The forecast for h = 2 is

b yN + 1
ybN +2 = b
+b
xN + 2 +

The forecast for t = T

N is

b yT 1
ybT = b
+b
xT +

In general, the ex-post 1-step forecast is expressed as


b yN +h 1 ; h = 1...T
ybN +h = b
+b
xN + h +

Values for lags of y are reset to history


Previous forecast errors do not matter
Jaime Marquez (SAIS)

Spring 2015

23 / 35

The 1-period ahead forecast error is


eN +h = yN +h
What are the sources of the forecast error?
eN +h

= [ + xN +h + yN +h
|
{z
y N +h

= [
|

Jaime Marquez (SAIS)

b
] +

ybN +h

+ uN + h ]
}
h

b
xN +h +
{z

parameter uncertainty

i
b N +h 1
b
+b
xN +h + y
{z
}
|

b yN +h 1 +

ybN +h

uN + h
| {z }

model uncertainty

Spring 2015

24 / 35

Illustration with the price of oil


Assume that the price of oil is explained by its own history and nothing else:
yt

= + ( L ) yt
12

(L)

+ ut

Lj

j =0

The long-run value of y is 1

(1 )

Estimate parameters with data from January 1987 to December 2013


Generate 1-period ahead forecasts from January 2014 to December 2014
In this application, a forecast for February 2014 does not feed into the
forecast for March of 2014 because the model uses historical values for lags
Jaime Marquez (SAIS)

Spring 2015

25 / 35

1-step Forecasts
West_Texas_Nominal
110

100

90

80

Model
Dependent variable: level of nominal West Texas oil price
Explanatory variables: constant + 12 lags of the dependent variable

70

60
2013

Jaime Marquez (SAIS)

2014

2015

Spring 2015

26 / 35

Ex-post forecasts: s-periods ahead


The model uses its own predictions for lags of the dependent variable
The forecast for h = 1 is
b yN
ybN +1 = b
+b
xN + 1 +

where yN is known because we have data for it


The forecast for h = 2 is

b ybN +1
ybN +2 = b
+b
xN + 2 +

where we are using ybN +1 instead of the observed value yN +1


The forecast for t = T N is
b ybT 1
ybT = b
+b
xT +

In general, the ex-post s-period ahead forecast is

for h = 1, 2,
Jaime Marquez (SAIS)

(T

b ybN +h 1
ybN +h = b
+b
xN + h +
N)

Spring 2015

27 / 35

The s-periods ahead forecast error is


eN +h

= yN +h

ybN +h

= [ + xN +h + yN +h
= [

h
b
] +

+ uN + h ]

xN + h + yN + h 1

b yN + h 1
b
+b
xN +h + b

b yN +h 1 + uN +h
b

b then
If we knew the true values of the parameters - = b
; = b
; =
eN + h

= (yN +h 1 ybN +h
= eN +h 1 + uN +h

1 ) + uN + h

There is no resetting of lagged values of the dependent variable to history


Forecast errors accumulate

Jaime Marquez (SAIS)

Spring 2015

28 / 35

Same model for oil prices but now I use the models own predictions for
lagged values of the endogenous variable:
130

Foreca sts
W est_T e xas_Nom inal

120

110

100

90

80

70

60
2013

Model
Dependent variable: level of nominal West Texas oil price
Explanatory variables: constant + 12 lags of the dependent variable

2014

2015

Note that the blue line is converging to the long-run value of y is 1


Jaime Marquez (SAIS)

(1 )

Spring 2015

29 / 35

Application to U.S. Imports

Goal estimation of the income elasticity for U.S. imports


The model is
mt = 0 + 1 yt + 2 mt 1 + ut
m is the log of real imports) dm= percent change of m
y is the log of real GDP ) dy = percent change of y
) dm
dy = 1 is the income elasticity

Estimate parameters using data from 1929 to 1963 and generate 1-period
and s-periods ahead ex-post forecasts

Jaime Marquez (SAIS)

Spring 2015

30 / 35

H:\Teaching\Spring 2015\Macroeconometrics\Koyck-Lag-US-imports.out 02/13/15 14:50:52

EQ( 8) Modelling m by OLS


The dataset is: H:\Teaching\Spring 2015\Macroeconometrics\ImportsUS.in7
The estimation sample is: 1930 1963
m_1
Constant
y

Coefficient
0.650539
1.06253
0.338683

sigma
R^2
Adj.R^2
no. of observations
mean(m)

0.100236
0.948394
0.945065
34
4.17776

Std.Error
0.1009
0.3226
0.08631

tvalue
6.45
3.29
3.92

tprob Part.R^2
0.0000
0.5728
0.0025
0.2592
0.0005
0.3319

RSS
0.311465034
F(2,31) =
284.9 [0.000]**
loglikelihood
31.5342
no. of parameters
3
se(m)
0.42766

Instability tests:
variance
0.34130
joint
1.4947*
Individual instability tests:
m_1
0.22652
Constant
0.18493
y
0.20693
1step (ex post) forecast analysis 1964 2013
Parameter constancy forecast tests:
Forecast Chi^2(50) =
671.86 [0.0000]**
Chow
F(50,31) = 0.50003 [0.9859]
CUSUM
t(49)
=
2.370 [0.0218]* (zero forecast innovation mean)
AR 12 test:
ARCH 11 test:
Normality test:
Hetero test:
HeteroX test:
RESET23 test:
m =
(SE)

F(2,29)
F(1,32)
Chi^2(2)
F(4,29)
F(5,28)
F(2,29)

=
2.7391 [0.0814]
= 0.049469 [0.8254]
=
3.5178 [0.1722]
=
1.4738 [0.2358]
=
1.4805 [0.2277]
=
7.1677 [0.0030]**

Residuals are OK

+ 0.65*m_1 1.1 + 0.34*y


(0.1)
(0.32) (0.086)

Solved static longrun equation for m


Coefficient Std.Error
Constant
3.04047
0.8834
y
0.969160
0.1190
Longrun sigma = 0.28683

tvalue
3.44
8.14

tprob
0.0016
0.0000

long-run income elasticity

Page: 1 of 1

Persistence

short-run income elasticity

Parameter constancy
Persistence: Lagged dep. variable
m_1

+/-2SE

0.5
0.0
1940
2.5

1945
Constant

1950

1955

1960

1965

1950

1955

1960

1965

1950

1955

1960

1965

+/-2SE

0.0

-2.5
1940

1945
y +/-2SE

1.0

Income

0.5

1940

Jaime Marquez (SAIS)

1945

Spring 2015

32 / 35

Distribution of lagged eects

0.3

0.2

0.1

10

15

20

25

30

35

40

10

15

20

25

30

35

40

1.0
y(cum)

0.8

0.6

0.4
0

Jaime Marquez (SAIS)

Spring 2015

33 / 35

Ex-post 1-period ahead forecasts


The estimation sample is: 1930 - 1963

1-step Forecasts

Coefficient Std.Error
m_1
0.650539 0.1009
Constant
-1.06253 0.3226
y
0.338683 0.08631

7.5

7.0

6.5

6.0

5.5

AR 1-2 test: F(2,29) = 2.7391 [0.0814]


ARCH 1-1 test: F(1,32) = 0.049469 [0.8254]
Normality test: Chi^2(2) = 3.5178 [0.1722]

5.0

4.5
1955

1960

Jaime Marquez (SAIS)

1965

1970

1975

1980

1985

1990

1995

2000

2005

2010

2015

Spring 2015

34 / 35

Ex-post s-period ahead forecasts

Forecasts

The estimation sample is: 1929 - 1963

7.5

m_1
Constant
y

7.0

Coefficient Std.Error
0.650539
0.1009
-1.06253
0.3226
0.338683 0.08631

6.5

6.0

5.5

5.0

AR 1-2 test:
F(2,29) = 2.7391 [0.0814]
ARCH 1-1 test: F(1,32) = 0.049469 [0.8254]
Normality test: Chi^2(2) = 3.5178 [0.1722]

4.5
1955

1960

Jaime Marquez (SAIS)

1965

1970

1975

1980

1985

1990

1995

2000

2005

2010

2015

Spring 2015

35 / 35

Вам также может понравиться