Demo: Example 5

Maximum Likelihood Estimation with Tobit Model

This demo provides two data input options for variable estimation and reports regression statistics based on a tobit regression model. The reported statistics include estimators, standard errors, T values, and p-values (against non-significant coefficients assumption) at the estimated point. For the best results, we recommend using Firefox for this interactive case study.

Back to the Maximum Likelihood Estimation with Tobit Model case study.

Option 1: Data in a text file

Users who have access to the data needed in the estimation should create a text file with the data, for example, the cheese consumption data from ENIGH (2002). See cheese_data.txt. User-provided data files must satisfy the following restriction:

  • The column that contains dependent variable must be indexed by y. The dependent variable could be either a (0/1) response variable or the "original" dependent variable that is converted to a (0/1) variable.

Note that the estimated coefficients in the tobit model are indexed by the names of the explanatory variables in the data.

Users then can download a sample GAMS model file, tobit_txt.gms (tobit model with text input), and modify it to solve their own estimation problems. Users should specify their own set definitions (sets "t" and "n" in the sample), include their own table of data (as described above), and run the modified model to obtain the estimation results.

Option 2: Data in a GAMS data exchange (gdx) file

Users who have access to the data in a GAMS data exchange (gdx) file can use one of the following two methods.

  • Method 1: Solve using the NEOS Server
    Users can click on the "Solve with NEOS" button to find estimation results based on the default gdx file, i.e., the cheese consumption data from ENIGH (2002). See cheese.gdx. Alternatively, users can upload their own data by clicking on the button next to "Upload GDX File" and then "Solve with NEOS". User-provided gdx files must satisfy the same restrictions as listed above in Option 1.

    Clicking on the "Reset" button will clear the solution.

  • Method 2: Calculate the regression statistics locally
    Users who have access to GAMS can download the GAMS model file, tobit_gdx.gms (tobit model with gdx input), and solve the model locally with the following command:
    • "gams tobit_gdx --in=mydata"

    where mydata.gdx is a data file provided by the user. The gdx file must satisfy the restrictions as described above in Option 1.