Title: Using LIMDEP 7.0 for Windows
1UsingLIMDEP 7.0 for Windows
2What is LIMDEP?
- Flexible and wide range of procedures
- Cross section data
- standard procedures
- advanced procedures
- Time series data
- standard procedures
3What is LIMDEP? (cont.)
- Basic procedures (examples)
- enter/import, create, transform data
- descriptive statistics
- single and multiple equation regression models
- cross section, time series, panel
- 2SLS, 3SLS, SURE, MLE
- logit probit models
- export output
4What is LIMDEP? (cont.)
- Advanced procedures (examples)
- nested logit models
- parametric duration models
- Poisson regression
- GMM
- stochastic frontier models
- nonlinear optimization
- write own function to be optimized
5Overview
- BASICS
- (re)opening Project
- importing data
- sample information
- output files
- saving
- creating/transforming variables
- (de)selecting variables
- plotting
- descriptive statistics
- estimating linear regression
6Overview (cont.)
- BEYOND BASICS
- estimating panel model
- (re)defining sample
- altering storage capacity
- modifying variables
- building command file
- saving correlation matrix
- exporting data
- practice
7BASICS
8Opening New LIMDEP Project
- Open LIMDEP.
- It will automatically open a new Project in a
window titled Untitled Project 1. - You are now ready to
- import data or
- enter data or
- open an existing LIMDEP Project.
9Re-opening Existing LIMDEP Project
- File
- Open Project
- select project
- Open
10Importing Data Files
- Project
- Import
- Variables
- Import dialog box appears
- select file to import
11Importing Data Files
- NOTE the most recent format of Excel file that
LIMDEP will import is Excel 4.0. - It will not import Excel files in any more recent
format.
12Facts About Sample
- After re-open existing project containing data
sample - determine no. of observations in sample
- look at top of project window
- below project name
- Data U1000 Rows 99 Obs
- tells you sample contains 99 observations
13Facts About Sample (cont.)
- determine no. of variables in sample
- left click over Variables
- look at bottom of project window
- Variables 9 of 200 used
- tells you sample contains 9 variables
14Output Files
- Output from most procedures automatically goes
to the output file. - It appears as another window in the main LIMDEP
screen. - You can then
- save it
- delete it
- edit it
- cut/copy/paste to other applications.
15Editing Output File
- Output window has limited editing capability
- Might want to edit output
- add comments
- add formatting (e.g., bold, underline)
16Editing Output File (cont.)
- Steps
- Copy all or part of output in Output window
- paste into your word processing application
- edit the new file
17Exporting Output
- Save output file
- Open it using word processing application
- Can now format, cut/copy/paste, etc. as with any
word processing file
18Saving a LIMDEP Project
- File
- Save OR
- File
- Save Project As
- type name in File name window in dialog box
- Save
19Creating New Variables /Transforming Existing
Variables Part 1
- Using Dialog Box to Enter Commands
- Project
- New
- Variable
- dialog box appears
- enter variable name in Name window
- enter expression in expression window
- OK
20Creating New Variables /Transforming Existing
Variables Part 1(cont.)
- Using Dialog Box to Enter Commands (cont.)
- NOTE some types of commands wont fit into the
format of the dialog box for CREATE. - In such cases, use the Text Editor.
- See Part 2
21Creating New Variables /Transforming Existing
Variables Part 2
- Using Text Editor to Enter Commands
- File
- New
- Text/Command Document
- now the Text Editing Window appears on right of
screen. - NOTE See CREATE command in Help for more
22Creating New Variables /Transforming Existing
Variables Part 2 (cont.)
- Using Text Editor to Enter Commands (cont.)
- Options in Text Editing Window
- type commands
- AND / OR
- insert full contents of a text file containing
LIMDEP commands - Insert, Text File
- select the file
23Creating New Variables /Transforming Existing
Variables Part 2 (cont.)
- Using Text Editor to Enter Commands (cont.)
- When ready to execute commands
- highlight the lines you want to execute
- Options
- press Go button on toolbar
- OR
- Run, select either Run or Run Multiple Times
24Selecting Variables in Dialog Boxes
- One variable at a time -
- highlight variable in variable list box
- select ltlt button
- repeat for one variable at a time until done.
25Selecting Variables in Dialog Boxes (cont.)
- Multiple variables at one time
- highlight each variable in variable list box
while pressing CTRL key - select ltlt button.
- OR . . . (next slide)
26Selecting Multiple Variables (cont.)
- highlight first variable in variable list box
- highlight last variable in variable list box
while pressing SHIFT key - select ltlt button.
27Selecting Variables in Dialog Boxes (cont.)
- Reversing any of the above
- after highlight variable(s)
- select gtgt button
28Plotting Variables
- Model
- Data Description
- Plot Variables
- enter variable name for X axis
- enter variable name for Y axis
- click Options tab to select any options you want
- Run
29Descriptive Statistics
- Model
- Data Description
- Descriptive Statistics
- in DSTATS dialog box, select variables for
descriptive statistics - click on Options tab
- select any option(s) you want
- select Run button
30Estimating Linear Regression Model
- Model
- Linear Models
- Regression
- select Dependent variable
- select Independent variables
31Estimating Linear Regression Model (cont.)
- For basic set of results, select Run
- Many other options under Options and Output.
- Can select these before selecting Run
32BEYOND BASICS
33Estimating Panel Model
- Model, Linear Models
- Regression
- select Dependent variable
- select independent variables
- select Options tab
- select Panel Data model
- select Stratify using variable
- select the stratification variable
34Estimating Panel Model (cont.)
- For basic set of results, select Run
- Many other options under Options and Output
- Can select these before selecting Run
35Defining Current Sample
36Defining Current Sample (cont.)
- Several selections available
- All all observations in sample
- Range enter either single observation no. or
range(s) of observation nos. - Include enter an expression
- example AGE gt 15
- Reject enter an expression
- example AGE ? 0
37Modifying Data Storage Capacity
- Can alter several characteristics of data storage
capacity - max no. of data values
- max no. of observations
- max no. of variables
- Project, Settings
- select Data Area tab
- DO THIS BEFORE HAVE DATA IN AN OPEN PROJECT
38Modifying Variables in Project
- Open project
- Right click over variable name
- Can now
- Edit
- Rename
- Sort
- Copy Name
- Delete
39Building a Command File
- Suppose you will be executing the same set of
commands many times with few/no changes each
iteration - Can use the menus each time
- could become lengthy process
- OR can use a command file
- could be quicker
40Building Command File (cont.)
- One beauty of LIMDEP is that you do NOT need to
learn LIMDEPs commands to build a command file - Each executed command is echoed in the output
file
41Building Command File (cont.)
- You can simply cut/copy/paste commands from the
output file into a new file - see Editing Output File slide
- Use that new file as command file
42Building Command File (cont.)
- See these sections in LIMDEP Help file
- 3.3. LIMDEP Commands
- 3.4. Submitting Commands Using the Editor and
input Files - 3.5. Program Output and the Output Window
43Saving Correlation Matrix
- Double click box containing Matrix COR.MAT
- Edit
- Select All
- Edit
- Copy
- go to application where youll copy this matrix
- Paste
44Saving Correlation Matrix (cont.)
- NOTE can paste into Excel or Word or whatever.
- Pasting matrices into Excel allows quicker
formatting such as - fitting to one page
- making output more readable, etc.
45Exporting (Data) Files
- Option 1
- Project
- Export
- Variables
- fill in windows in dialog box
46Exporting (Data) Files (cont.)
- Option 2
- Project, Data Editor
- Edit, Select All
- Edit, Copy
- go to whichever application you will export data
into - select location for copy
- paste
47Practice Exercise
- Complete each step in the following practice
exercise - Compare your results at each step with the
results shown on the following slides
48Practice Exercise (cont.)
DISPINC disposable personal income PERSCONS
personal consumption expenditures DUMMY
indicator for selected years
49Step 1
- Create an Excel file containing the data shown on
the previous slide - Save it as EXCEL 4 FILE
- Import it into LIMDEP
- Save the project
- name it LIMDEP Practice
50Step 1 Result
51Step 2
- Plot YEAR (on horizontal - x axis) against
DISPINC - select option connect data points with lines
- Plot YEAR (on horizontal - x axis) against
PERSCONS - select option connect data points with lines
52Step 2 Result
53Step 2 Result (cont.)
54Step 3
- Calculate descriptive statistics for all four
variables in your sample, including a correlation
matrix
55Step 3 Result
Descriptive Statistics
All results based on nonmissing
observations. Variable Mean
Std.Dev. Minimum Maximum
Cases ------------------------------------------
--------------------------------------------------
------ YEAR 1974.50000
3.02765035 1970.00000 1979.00000
10 DISPINC 879.240000 86.4050179
751.600000 1015.70000 10 PERSCONS
793.430000 84.9654315 672.100000
927.600000 10 DUMMY .400000000
.516397779 .000000000 1.00000000
10
Matrix COR.MAT. has 4 rows and 4 columns.
YEAR DISPINC
PERSCONS DUMMY ---------------------
--------------------------------------------------
---------------------- YEAR
.1000000D01 .9876668D00 .9853315D00
.8528029D00 DISPINC .9876668D00
.1000000D01 .9958588D00 .8397949D00 PERSCONS
.9853315D00 .9958588D00 .1000000D01
.8723582D00 DUMMY .8528029D00
.8397949D00 .8723582D00 .1000000D01
56Step 4
- Define a subset of the sample as only those
observations in 1975-1979 - Calculate descriptive statistics for all four
variables in your sample, including a correlation
matrix
57Step 4 Result
58Step 4 Result
Descriptive Statistics
All results based on nonmissing
observations. Variable Mean
Std.Dev. Minimum Maximum
Cases ------------------------------------------
--------------------------------------------------
------ YEAR 1977.00000 1.58113883
1975.00000 1979.00000
5 DISPINC 945.820000 57.6437941
874.900000 1015.70000 5 PERSCONS
859.520000 59.8149396 779.400000
927.600000 5 DUMMY .800000000
.447213595 .000000000 1.00000000
5
Matrix COR.MAT. has 4 rows and 4 columns.
YEAR DISPINC
PERSCONS DUMMY ---------------------
--------------------------------------------------
---------------------- YEAR
.1000000D01 .9973356D00 .9952343D00
.7071068D00 DISPINC .9973356D00
.1000000D01 .9950853D00 .6877668D00 PERSCONS
.9952343D00 .9950853D00 .1000000D01
.7487835D00 DUMMY .7071068D00
.6877668D00 .7487835D00 .1000000D01
59Step 5
- Redefine the sample to all observations
- Create a new variable using the dialog box
- CONSDUM PERSCONDUMMY
- Create a new variable using the text editor
- INCDUM DISPINCDUMMY
60Step 5 Result
61Step 5 Result (cont.)
62Step 6
- Regress PERSCONS (DV) on DISPINC INCDUM
- use the REGRESS command
- ALWAYS include ONE
63Step 6 Result
-------------------------------------------------
---------------------- Ordinary least
squares regression Weighting variable none
Dep. var. PERSCONS Mean 793.4300000
, S.D. 84.96543153 Model size
Observations 10, Parameters 3,
Deg.Fr. 7 Residuals Sum of squares
231.9503620 , Std.Dev. 5.75637
Fit R-squared .996430, Adjusted
R-squared .99541 Model test F
2, 7 976.89, Prob value
.00000 Diagnostic Log-L -29.9091,
Restricted(b0) Log-L -58.0850
LogAmemiyaPrCrt. 3.763, Akaike Info. Crt.
6.582 Autocorrel Durbin-Watson
Statistic 2.40024, Rho -.20012
-----------------------------------------------
------------------------ ----------------------
--------------------------------------------
Variable Coefficient Standard Error
t-ratio PTgtt Mean of X ----------------
----------------------------------------------
---- Constant 22.02492142 35.449853
.621 .5541 DISPINC .8674311681
.43031505E-01 20.158 .0000 879.24000 INCDUM
.2263737821E-01 .74607995E-02 3.034
.0190 385.42000