/*--------------------------------------------------------------

                    SAS Sample Library

        Name: hpqligs.sas
 Description: Example program from SAS/ETS User's Guide,
              The HPQLIM Procedure
       Title: Getting Started Example for PROC HPQLIM
     Product: SAS/ETS Software
        Keys: limited dependent variables
        PROC: HPQLIM
       Notes:

--------------------------------------------------------------*/

title1 'Estimating a Tobit Model';

data subset;
   input Hours Yrs_Ed Yrs_Exp @@;
   if Hours eq 0 then Lower=.;
      else               Lower=Hours;
datalines;
0 8 9 0 8 12 0 9 10 0 10 15 0 11 4 0 11 6
1000 12 1 1960 12 29 0 13 3 2100 13 36
3686 14 11 1920 14 38 0 15 14 1728 16 3
1568 16 19 1316 17 7 0 17 15
;

/*-- Tobit Model --*/
proc hpqlim data=subset;
   model hours = yrs_ed yrs_exp;
   endogenous hours ~ censored(lb=0);
   performance nthreads=2 nodes=4 details;
run;