LIMDEP 7.0

Contents

Description of LIMDEP 7.0

LIMDEP is a package of statistical programs with strong emphasis on econometric methods. Examples of procedures available in LIMDEP that are not readily available in other statistical packages include multinomial logistic regression, discrete-choice models, nested logistic regression, bivariate probit regression, poisson regression, tobit regression, switching regression, censored regression, and truncated regression.

Where to find LIMDEP 7.0

LIMDEP 7.0 is available on strauss. It is located in

/opt/bin/limdep7

To access LIMDEP, log in to strauss and type the limdep script (see instructions below).

Instructions for LIMDEP 7.0

These instructions summarize how to run LIMDEP 7.0 in non-interactive (batch) mode on strauss.

Using the ezlimdep script

The simplest way to run LIMDEP 7.0 is to set up your account with a command called ezlimdep. The ezlimdep command does the following:

  1. Simplifies the UNIX command to run LIMDEP.
  2. Prepends your LIMDEP commands and diagnostics (trace.lim) to the output file.
  3. Makes it unnecessary to include an "open; output ..." command in your command file.
  4. Adjusts the output file so it will print with correct page breaks.

To install ezlimdep, type

source
/www/htdocs/topics/software/special/statmath/limdep7/ezlimdep_install

from your UNIX prompt. Note: You can copy this command with a mouse and paste it into a telnet or Xterm window while connected to strauss or mahler.

The ezlimdep command should work immediately after this command. If it does not, log out and log in again.

The syntax for running LIMDEP 7.0 with the ezlimdep command is

ezlimdep cmdfile

Replace cmdfile with the name of your LIMDEP command file. If the file has an extension of .lmd, .limdep, .lim, .LMD, or .LIMDEP, you need type only the root part of the name. For example, a command file called nlogit.lmd can be shortened to nlogit when used with the ezlimdep command:

ezlimdep nlogit

For this example, your commands, LIMDEP diagnostics, and LIMDEP estimation results are written to a file called nlogit.lst. (The trace.lim file does not exist at the end of the run, but its contents are in the nlogit.lst file.)

Generally, you should not include an open; output=outfile$ statement in the command file when using ezlimdep. However, if you want to redirect part or all of your output to a file other than the one written by ezlimdep (nlogit.lst for this example), you can include an open; output= outfile$ statement in your command file. Estimation results after the open statement will be written to outfile. Note that outfile will not be formatted for correct page breaks when printed.

Contents | Instructions

Running LIMDEP without the ezlimdep script

To run LIMDEP 7.0 directly using a command file called nlogit.lmd, type

limdep   <   nlogit.lmd

To suppress all output to the terminal screen, type the following instead:

limdep < nlogit.lmd >& /dev/null

Without the ezlimdep script, your LIMDEP estimation results are written to the terminal screen, unless you include an open; output=outfile statement in your command file. This statement should be placed immediately after the batch$ statement (second line) in the command file, so that all your output is written to the designated output file.

Also, without the ezlimdep script, the page breaks in the LIMDEP output will not be correct.

Contents | Instructions 

Example 1: Reading data from a command file

This example shows how to read data from a command file and produce descriptive statistics and a multiple regression. Note that the lines beginning with "?" are LIMDEP comments.

In this example, the name of the command file is tax.lmd and the name of the output file is tax.lst.

The contents of the command file are:

BATCH$
? This is a sample LIMDEP command file with 
? data included in the command file.

READ;NOBS=12;NVAR=6;NAMES;tax,priv,ptax,inc,yrs,tch;
  FORMAT=(2f2.0,1x,f6.0,f8.0,f3.0,f2.0)$
1 0 7.0475  9.7700 10 1 
0 0 7.0475 10.0210  8 0 
0 0 7.0475 10.0210  4 0 
1 1 6.7452 10.2220  4 0 
1 0 7.2793 10.0210  5 0 
1 1 7.0475 10.2220  5 1 
0 0 6.3969  9.7700 30 0
0 1 7.0475 10.0463  7 0 
1 1 7.0475 10.2220  2 0 
0 0 7.0475  8.2940  2 1 
0 1 7.4955 10.2220 18 0 
1 0 6.7452  9.4335 49 0

DSTATS;RHS=tax,priv,ptax,inc,yrs,tch$

CRMODEL;LHS=tax;RHS=one,priv,ptax,inc,yrs,tch$

Note that this command file does not contain an open;output=... statement because it is run using the ezlimdep command.

To run this program with the ezlimdep script, type

ezlimdep tax

For this example, the LIMDEP commands, LIMDEP diagnostics, and output are written to a file named tax.lst.

You may print the results using the qpr command

qpr -q smips tax.lst

This command sends the output to the Smith Hall laser printers. To send the output elsewhere, substitute the name of the local printer for smips. Usually the name of the local printer is posted at the site.

Contents | Instructions

Example 2: Reading data from an external data file

This example shows how to read data from a file external to your command file and produce descriptive statistics and a multiple regression. Note that the lines beginning with "?" are LIMDEP comments.

In this example, the name of the command file is tax.lmd, and the name of the data file is tax.data. The contents of the command file are:

BATCH$ 
? This is a sample LIMDEP 7.0 command file showing how to read 
? data from an external data file.
 
? The read command reads data from a file named "tax.data."

READ;NOBS=12;NVAR=6;NAMES;tax,prov,ptax,inc,yrs,tch;
    FILE=tax.data;FORMAT=(2f2.0,1x,f6.0,f8.0,f3.0,f2.0)$

DSTATS;RHS=*$

CRMODEL;LHS=tax;RHS=priv,ptax,inc,yrs,tch$
The contents of the data file named tax.data are shown below. They are the same data used in Example 1.

1 0 7.0475  9.7700 10 1 
0 0 7.0475 10.0210  8 0 
0 0 7.0475 10.0210  4 0 
1 1 6.7452 10.2220  4 0 
1 0 7.2793 10.0210  5 0
1 1 7.0475 10.2220  5 1 
0 0 6.3969  9.7700 30 0 
0 1 7.0475 10.0463  7 0 
1 1 7.0475 10.2220  2 0 
0 0 7.0475 8.2940   2 1 
0 1 7.4955 10.2220 18 0 
1 0 6.7452  9.4335 49 0

As in example 1, this command file does not contain an open;output=... statement because it is run using the ezlimdep command.

To run this program with the ezlimdep script, type

ezlimdep tax

For this example, your LIMDEP commands, LIMDEP diagnostics, and output are written to a file named tax.lst.

You may print the results using the qpr command

qpr -q smips tax.lst

This command sends the output to the Smith Hall laser printers. To send the output elsewhere, substitute the name of the local printer for smips. Usually the name of the local printer is posted at the site.

Contents | Instructions

Using a TEMP file

When your data file is too large to fit into LIMDEP, specify a TEMP file in the /tmp directory or in /scratch if the file size exceeds 10MB. The TEMP specification is a subcommand of the read command, for example

read;file=xyz.csv; nobs=1000; nvar=5;
names(x_1,x_2,x_3,y_1,y_2);
TEMP=/tmp/<username>.lmdtmp;MAXVAR=10$

Replace <username> with your own username (to avoid conflicts with other LIMDEP users). And be sure to include the MAXVAR subcommand. It should specify a number at least equal to the number of variables read plus the number you will calculate. (Uppercase is for emphasis only.)

To estimate the size of your TEMP file in advance, calculate

8*(nobs*maxvar+10000)

If this calculation exceeds 10,000,000, request quota on the /scratch file system and put your LIMDEP TEMP files there. However, this calculation is a very rough estimate. To verify it, check the file size after your LIMDEP run

ls -l /tmp/<username>.lmdtmp

Note: If your TEMP file resides in the /tmp directory, be sure to remove it before you log off strauss. To remove it, type

rm /tmp/<username>.lmdtmp

again replacing <username> with your own username.

Contents | Instructions

Common problems

The output files produced by LIMDEP 7.0 do not produce correct page breaks on the UNIX printers. This problem is fixed automatically if you use the ezlimdep script.

Contents | Instructions

Other resources

Contents | Instructions