Economics 8747: Numerical Assignment #2

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

Numerical Assignment #1


Web page
Zip file

Numerical Assignment #2


The Gauss data file
New: The Solution

Getting Started


You may first want to download the zip file containing the first assignment for your records.

As with the first numerical assignment, there is a bug in one of the header files for the maximum likelihood libraries in Gauss 5.0 in the computer labs. So the first thing you should do is create a working directory for yourself. I called mine D:\collin. Place the file MAXLIK.DEC in your working directory. This file is a corrected version of the buggy header file.

Now open Gauss by selecting Start | Programs | Gauss 5.0 | Gauss 5.0. In the Gauss command window, issue the command chdir to change Gauss' working directory to your working directory:

>> chdir "D:\collin";
You are now ready to proceed.

The Data


The data file logit.dat contains 224 observations taken from consumer choices of automobiles.

  • The consumers were offered either a standard options package or a deluxe options package. The deluxe options package is a superset of the standard package.
  • Once a package had been selected, each was given a choice of three alternatives.
  • Each of the alternatives has both a cost associated with the purchase of the alternative and a cost associated with the installation of the alternative.
  • The consumer's income was recorded at the time of purchase.

Each observation consists of the following 21 columns. The columns are given names for reference.

Column(s) Name(s) Description
1 - 6 alt1 - alt6 Choice indicators. The indicator is 1 if the choice was made, 0 otherwise. The sum over the first 6 columns of any observation will be 1. Choices 1 through 3 indicate that the deluxe option was chosen. Choices 4 through 6 indicate that it was not.
7 - 12 inst1 - inst6 Installation costs of the basic package. Column 7 represents the cost of alternative 1, column 8 the cost of alternative 2, etc. Columns 7, 8, and 9 reflect the alternatives associated with choosing the deluxe package whereas columns 10, 11, and 12 reflect the basic package.
13 dinst Installation cost of the deluxe package.
14 - 19 cost1 - cost6 Cost of the basic package. Column 14 represents the cost of alternative 1, column 15 the cost of alternative 2, etc. Columns 14, 15, and 16 reflect the alternatives associated with choosing the deluxe package whereas columns 17, 18, and 19 reflect the basic package.
20 dcost Cost of the deluxe package.
21 y Consumer income.

The model must accomodate the following assumptions:

  • Income enters the model both in the purchase of the deluxe options package and in the third alternative in each package, which is presumed a priori to appeal to lower-income consumers.
  • In addition to the cost and income term, an indicator variable should be included which is 1 when the deluxe package is chosen and 0 otherwise.

There are three parts to this numerical assignment.

Part 0: Fixed Coefficients Logit Maximum Likelihood Estimation


In the first assignment, you must estimate the coefficients of each of the six alternatives using a standard logit model with fixed coefficients. The data munging will likely be the most difficult conceptual problem associated with this part of the assignment.

Comment on the parameter estimates.

Part 1: Fixed Coefficients Nested Logit Maximum Likelihood Estimation


In the second, you must assume a nested decision structure in which the first three alternatives, associated with the standard options package, are included in one nest and the remaining three alternatives, associated with the deluxe options package, are included in the other. Again, assume fixed coefficients.

Use a variable named (let's call it lambda for now) to represent the degree of independence in unobserved utility among the alternatives (see Train pp. 83-84) in each nest.

Comment on the differences between the results you received with and without nesting. Also comment on the value of lambda.

Hint: Try using the parameter estimates you obtained in the nonnested estimation as initial values for the nested estimation.

Part 2: Random Coefficients Logit Maximum Likelihood Estimation


Finally, you must estimate the coefficient on the cost of the basic options package assuming a random coefficient. Assume the coefficient is distributed normally.

Use 100 draws for each observation (see Train pp. 148-149).

Comment on your estimate of the variance of the random coefficient.

Hint: Choose one of the coefficients with a high t-statistic.


Last modified November 17, 2003