Econ321 2017 Tutorial 2 Lab
Econ321 2017 Tutorial 2 Lab
Econ321 2017 Tutorial 2 Lab
We need to get back into STATA. Once it’s up and running, change the default
directory to the one that contains the dataset that you’ll read into STATA. On
the command line type:
cd j:\data
This will change the directory to r: where our data are stored.
These are again time series data for the New Zealand economy over this 92-
quarter period (23 years). Tell STATA that these are times series data by
typing:
generate qtr=obs+103
tsset qtr, quarterly
Begin with the simplest two-variable regression model we estimated last time:
regress lfpr ur
Since this is a time series regression, we might want to test for serial
correlation in the disturbances. Unlike other software packages, STATA does
not automatically produce the Durbin-Watson d Statistic. You can ask for it
by typing:
estat dwatson
Recall that the DW statistic is used to test the null hypothesis of first-order
(AR(1)):
autocorrelation
ut = ρut −1 + ε t
d≈2 (1−ρ )
NOTE: Unlike t and F-tests, there is no single critical value for this test
procedure. This is because the test statistic itself is a function of the
explanatory variables in the regression. Instead, we get upper and lower
thresholds for this test procedure (refer to a conventional DW table). If the
d statistic is sufficiently far from 2, then we reject the null in favour of + or
– negative autocorrelation. If close to 2, we don’t reject the null. In
between these thresholds, we say that the test is inconclusive.
3
estat durbinalt
1 250.634 1 0.0000
The default is a test against AR(1). This says that we can reject H0 (see this
listed at the bottom of this table) at better than a 0.01% level.
This procedure has another advantage: it allows us to test for higher orders of
autocorrelation. For example, we could test against AR(2)
( u t = ρ1 u¿ ut −2 + ε t ) by typing:
estat durbinalt, lags(2)
2 255.493 2 0.0000
Or against AR(4) (
u t =ρ1 ut −1 + ρ2 u t −2 + ρ3 ut −3 + ρ4 u t −4 + ε t )
:
4 266.509 4 0.0000
All of these forms are possible, but let’s go with the simplest AR(1) form.
lfpr t =β 1 + β 2 ur t +ut
Bur now recognise that the disturbances likely follow an AR(1) process:
4
ut = ρut −1 + ε t
The usual OLS standard errors are incorrect, because they assume no
autocorrelation. It’s easy to motivate what we should do in this situation.
=β 1 ( 1− ρ ) + β 2 ( ur t −ρ ur t −1 ) + ε t
¿ ¿
lfpr t =δ 1 + β 2 ur t + ε t
Feasible GLS uses exactly the same steps as above, but replaces the known ρ
^ . This can come from the original OLS estimation of the
with at estimator ρ
regression model, and using the residuals to estimate this coefficient of
autocovariance:
e t = ρ^ e t −1 +ε t
With as estimate of ρ we can transform the data and get estimates for the β
coefficients.
But this improvement in our estimates for the β coefficients would also
improve our estimates for the disturbances and therefore ρ . This will produce
an iterative process known as the Cochrane-Orcutt or Prais-Winston
5
Semi-robust
lfpr Coef. Std. Err. t P>|t| [95% Conf. Interval]
rho .9892771
The estimate for the slope coefficient has declined substantially in magnitude.
With OLS we got an estimate of -0.664 (and significantly different from zero
at better than a 0.1% level). With GLS we get an estimate of -0.127 (and only
significantly different from zero at a 16.8% level). This raises some concerns
about the negative impact of the unemployment rate on participation.
We could also consider a Distributed Lag version of this model. The labour
force participation rate may depend on both the current and lagged
unemployment rates.
These lags are easy to create with time series data. Type the following:
generate ur1=l.ur
generate ur2=l2.ur
7
This will create lags for the unemployment rate for one and two quarters,
respectively.
It’s always easy to check that you’ve done the right thing by listing these
variables:
. list ur ur1 ur2
ur ur1 ur2
1. 4.2 . .
2. 4.1 4.2 .
3. 4.1 4.1 4.2
4. 4.1 4.1 4.1
5. 4 4.1 4.1
6. 4.1 4 4.1
7. 4.1 4.1 4
8. 4.3 4.1 4.1
9. 4.8 4.3 4.1
10. 5.3 4.8 4.3
Note that the lagged values are missing for first quarter (both ur1 and ur2)
and the second quarter (just ur2).
lfpr t =β 1 + β 2 ur t + β 3 ur t −1 + β 4 ur t −2 +ut
These regression results show suggest that the effect of unemployment lagged
one quarter is particularly important for participation. On average, a one
percentage-point increase in the unemployment rate reduces the labour force
participation rate by about 0.2 percentage points. The P-value is about 2.5%.
8
Semi-robust
lfpr Coef. Std. Err. t P>|t| [95% Conf. Interval]
rho .980731
test ur+ur1+ur2=0
( 1) ur + ur1 + ur2 = 0
F( 1, 86) = 9.86
Prob > F = 0.0023
9