ProblemSet 01
ProblemSet 01
Problem Set #1
Maximum Likelihood Estimation
W
elcome to the exercise classes in Econometrics II. Through the 13 weeks of
exercises, you will work with 8-9 problem sets, each dealing with one of the
main topics in the curriculum. In addition, there are four assignments that
you hand in through the peer-feedback platform. For each of the four assignment, the
exercise class takes the form of a workshop, where you can work on the assignment, discuss
the material with fellow students, ask questions and get assistance.
We strongly believe, that in order to learn econometrics, it is important that you read and
understand the written material, but also that you work with the tools and arguments by
yourself and that you apply the models to actual economic data. The problem sets and
assignments are designed to encourage that and include:
(i) Theoretical exercises. They deal with main issues and tools presented at the lectures
and are useful in order to become familiar with the econometric reasoning and to
obtain a …rm understanding of the mathematical structure of the models.
(ii) Empirical exercises. These exercises deal with real economic data and are con-
structed as step-by-step guides on how to perform an empirical analysis within the
current topic and which problems and issues to consider in the interpretation. Later
on, if you want to perform a similar analysis of a di¤erent topic, the steps in these ex-
ercises are typically helpful. Throughout, some hints are given on how to practically
perform the analyses within the software package OxMetrics.
(iii) Assignments. These are case studies, which are loosely formulated economic hy-
potheses or problems that you are asked to analyze. For these case studies you are
given a relevant data set and a formulation of the problem, but there are only few
hints on how to proceed, and it is up to you to design the empirical analysis; you
are encouraged to work in groups. It is important to realize that there is no single
correct answer to these questions (!) and several di¤erent routes may be relevant as
long as you can convincingly argue for the choices you make.
The work with the empirical case studies–and the fact that you write a short empir-
ical paper for each–will give you a good background for potential empirical analyses
in you B.Sc. projects or M.Sc. theses.
1
This …rst problem set deals with the likelihood analysis and applications to some simple
models. Exercise #1.1 is a simple maximum likelihood (ML) estimation in an exponential
model. Exercise #1.2 is optional. It derives the maximum likelihood estimator in a …rst
order autoregressive model to illustrate how to deal with dependent observations. Exercise
#1.3 is an empirical linear time-series regression applied to Danish consumption data.
(1) Present the intuition for the maximum likelihood estimation principle, and outline
the basic steps in deriving the estimator and the covariance matrix of the estimates.
(2) Write the log-likelihood function for the set of observations, x1 ; x2 ; :::; xn . Be explicit
on your assumptions.
(3) Derive the maximum likelihood estimator, ^ .
Assume that the manufacturer has observed n = 100 lifetimes, x1 ; x2 ; :::; x100 , and
P
that 100
i=1 xi = 987. Find the maximum likelihood estimate for this case.
Explain the di¤erence between the estimate and the estimator.
(4) Find the Hessian contribution as the second derivative
@ 2 log `i ( )
Hi ( ) = ;
@ @
where log `i ( ) is the log of the likelihood contribution for observation i, and the
information,
I( ) = E [Hi ( )] :
(5) State the conditions under which the MLE is asymptotically normal, such that
p d
n( ^ 0) ! N (0; ( 0 )); with ( 0) = I( 0)
1
:
Check the conditions for the current model and argue that they are satis…ed.
(6) State the asymptotic variance of ^ for the example above.
(7) Explain the Wald principle for hypotheses testing.
Construct a Wald test for the hypothesis that the expected lifetime is 11:1 in the
numerical example above. Be speci…c with the formulation of hypothesis, statistic,
and critical value.
What do you conclude?
2
#1.2 ML Estimation in an Autoregressive Model (optional)
Consider the …rst order autoregressive, AR(1), model
yt = yt 1 + t; t = 1; 2; :::; T; (1.2)
(1) Show how the joint density function for the time series, y0 ; y1 ; :::; yT , denoted
2
f (y0 ; y1 ; :::; yT j ; );
y1 ; y2 ; :::; yT j y0 :
(4) State the likelihood equations as the …rst order conditions for maximizing the log-
likelihood function.
Solve the …rst order conditions and …nd the ML estimators, ^ and ^ 2 .
(5) How do the ML estimators compare to the OLS estimators in the model (1.2)?
(6) Find the Hessian matrix of double derivatives,
2 2 2 2 !
@ log `t ( ; ) @ log `t ( ; )
2 @ @ @ @ 2
Ht ; = @ 2 log `t ( ; 2) @ 2 log `t ( ; 2) ;
@ 2@ @ 2@ 2
2 2
I( ; )= E[Ht ( ; )]:
(7) State the conditions under which the MLE is asymptotically normal.
Check the conditions for the current model and argue that they are satis…ed.
(8) State the asymptotic distribution.
3
#1.3 Time Series Regression for Private Consumption
To introduce the software package OxMetrics, we consider a data set for aggregate private
consumption in Denmark for the period 1971 : 1 2018 : 3. To obtain stationary variables
we transform the variables by taking …rst-di¤erences and by making linear combinations,
i.e. by co-integration. We treat this topic in more details later in the course.
(1) Download the data from the Absalon course page to your own computer. The data
in OxMetrics format is:
ConsumptionData:oxdata:
Start OxMetrics, unzip the …le and open the data set. The data set contains obser-
vations for the variables
All the variables, except the interest rate, are seasonally adjusted and are taken
from the data base from the model MONA of the Danish Central Bank.
Have a look at the data to see how the database is organized.
(2) Choose [Graphics...] in the [Model] menu and construct time series graphs of
the variables. Characterize the time series behavior of the variables.
(3) For the empirical modelling, construct the derived variables
ct = log(FCPt )
yt = log(FYD_Ht )
wt = log(FWCPt )
pt = log(PCPt )
t = 4 pt = pt pt 4
rt = IBZt t
Where log( ) denotes the natural logarithm (as always!). To make the transforma-
tions choose the [Algebra...] editor in the [Model] menu and load the algebra …le
ConsumptionData.alg located also on the home page. Run the algebra …le. Take
a look at the database. What variables have been constructed? Note that the …le
name is now followed by an . What does that mean?
[Hint: Note that the algebra editor is case sensitive. One way to work with data …les
in OxMetrics is to use a data …le for the original data and save an algebra …le with
transformations. Each time you open the data …le you should run the associated
algebra …le to apply the transformations to the data base. Alternatively, you can
save your data including the transformed variables. If you work with the data for
4
longer periods, however, the number of variables will typically grow and it is often
di¢ cult to remember how all the transformed variables were de…ned].
(4) Draw time series graphs of the transformed variables, ct , yt , wt , t , IBZt , rt and
ARBLOSt ; and discuss the economic development in Denmark over the period.
From a graphical inspection, do any of the variables appear stationary?
In the construction of time series regression models, why is it important that the
included variables are stationary?
(5) To obtain stationary variables consider the following transformations:
ct = ct ct 1
yt = yt yt 1
wt = wt wt 1
rt = rt rt 1
ct = 1 + 2 ct 1
+ 3 yt + 4 yt 1
+ 5 wt + 6 wt 1
+ 7 rt + 8 rt 1
+ 9 ARBLOSt + 10 ARBLOSt 1
+ 11 ECMt 1 + t;
5
(9) Use OxMetrics to calculate the tests for misspeci…cation of the model. This is done
by selecting [Test Summary] in the [Test] item in the [Model] menu. Try to recall
how the tests are constructed and how they should be interpreted.
What do you conclude regarding the speci…cation of the model.
(10) Now simplify the model by removing regressors with insigni…cant coe¢ cients. Begin
by deleting the variable with smallest t ratio and continue until all coe¢ cients are
signi…cant. Always retain the constant term.
Recalculate the misspeci…cation tests.
(11) The process of successively simplifying the model has been automated in OxMetrics.
To used this facility, choose [Automatic Model Selection] on the …rst page after
formulating the model. The algorithm tries many di¤erent routes of reduction, and is
in general more robust than the manual approach, where you only try one reduction
path.
Compare with your own …nal model.
(12) Finally, rerun the automatic reduction based on the general model, but now let
the [Automatic Model Selection] insert dummy variables for large outliers in the
residuals. This is done by expanding the section [Outlier and break detection]
and selecting [Large residuals].
Do the included dummy variables change the results?
Could you explain why the dummies are included, i.e. if something particular hap-
pened in the Danish economy at these points in time?
(13) Explain under which conditions the regression analysis above is a likelihood analysis.
Explain by reference to the concept of a quasi-maximum likelihood estimation, why
the estimates may still be consistent and asymptotically normal even if the error
terms do not follow a Gaussian distribution.