UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SAS Code Fragments
Heckman Selection Model

This example is taken from Stata's manual on Heckman model. The data set womenwk.sas7bdat is in SAS 8 format and can be accessed following the link.

libname in 'd:\data\sas';
data womenwk;
  set in.womenwk;
  sel = (wage~=.);
run;
proc qlim data = womenwk ;
  model sel = married children education age /discrete;
  model wage = education age /select(sel=1);
run;
The QLIM Procedure
                          Summary Statistics of Continuous Responses
                                                                                  N Obs  N Obs
                                  Standard                       Lower     Upper  Lower  Upper
Variable         N      Mean         Error        Type           Bound     Bound  Bound  Bound
  wage        1343  23.69217      6.305374      Regular
         Discrete Response Profile of sel
Index         Value           Frequency    Percent
  1             0                   657      32.85
  2             1                  1343      67.15


             Model Fit Summary
Number of Endogenous Variables             2
Endogenous Variable                 sel wage
Number of Observations                  2000
Log Likelihood                         -5178
Maximum Absolute Gradient          0.0001161
Number of Iterations                      24
AIC                                    10377
Schwarz Criterion                      10433
Algorithm converged.
                         Parameter Estimates
                                      Standard                 Approx
Parameter             Estimate           Error    t Value    Pr > |t|
wage.Intercept        0.485795        1.077038       0.45      0.6520
wage.EDUCATION        0.989953        0.053256      18.59      <.0001
wage.AGE              0.213129        0.020603      10.34      <.0001
_Sigma.wage           6.004795        0.165720      36.23      <.0001
sel.Intercept        -2.491015        0.189340     -13.16      <.0001
sel.MARRIED           0.445171        0.067395       6.61      <.0001
sel.CHILDREN          0.438707        0.027783      15.79      <.0001
sel.EDUCATION         0.055732        0.010735       5.19      <.0001
sel.AGE               0.036510        0.004153       8.79      <.0001
_Rho                  0.703504        0.051227      13.73      <.0001

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California