Economics 8747: Numerical Assignment

Fall 2003

Contact: Collin StarkweatherEconomics Department
Phone: (303) 492-4784 (do not leave messages)University of Colorado
E-mail: Boulder, CO 80309-0256

Resources


An online introduction to Gauss.
Gauss 5.0 Quick Start Guide
Gauss 5.0 User's Guide
Gauss 5.0 Language Reference

Example: Poisson


The Gauss program
The Gauss data file

Example: Probit


The Gauss program
The Gauss data file

Example: GMM


The Gauss program
The Gauss data file
The Gauss program: 4 moments
The Gauss output: 4 moments

Extra Documentation


MAXLIK documentation
sqpSolve documentation

The GMM "Bug"


The GMM estimation I originally constructed contained two offsetting "bugs" which resulted in the solver providing the correct estimation values, only one of which ended up in the code provided to class.

The code as originally written reformulated jwj with each iteration of the optimization subroutine. Formulating the inverse outside the loop and letting it remain static throughout the optimization produces answers very close to those presented in Green 4th edition.

However, in Green 3rd and 5th editions, the same example generated with the same data produces a very different result. As you may have surmised by now, the result in the 3rd and 5th editions is almost identical to the result produced by reconstituting jwj within the optimization loop.

So it appears that Green himself has performed the optimization both ways and presented both regression results in various editions of the textbook.

In addition to the discussion that was requested in the original assignment, please discuss the difference between the two methods and the results they provide.

For reference, the differences (in diff format) between the original and updated files are as follows:

15c15
< OUTPUT FILE = ./gmm.out RESET;
---
> OUTPUT FILE = ./gmmv2.out RESET;
40a41,44
> j = DIAGRV(ZEROS(2,2),lambda|lambda^2);
> 
> jwj = inv(j*w*j);
> 
86c90
<       LOCAL p, lambda, x1, x2, x3, x4, mu1, mu2, mu3, mu4, mu, jwj, ret;
---
>       LOCAL p, lambda, x1, x2, x3, x4, mu1, mu2, mu3, mu4, mu, ret;
98c102
<       jwj = inv(j*w*j);
---
>       @ jwj = inv(j*w*j); @


Last modified September 14, 2003