Censored Data Models in Proc ENTROPY

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

                    SAS Sample Library

        Name: entex03.sas
 Description: Example program from SAS/ETS User's Guide,
              The ENTROPY Procedure
       Title: Censored Data Models in Proc ENTROPY
     Product: SAS/ETS Software
        Keys: Generalized Maximum Entropy
        PROC: ENTROPY
       Notes:

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

data cens;
  do t = 1 to 100;
     x1 = 5 * ranuni(456);
     x2 = 10 * ranuni(456);
     y = 4.5*x1 + 2*x2 + 15 * rannor(456);
     if( y<0 ) then y = 0;
     output;
   end;
run;

title "Censored Data Estimation";
proc entropy data = cens gme primal;
   priors intercept -32 32
          x1        -15 15
          x2        -15 15;
    model y = x1 x2 /
          esupports = (-25 1 25);
run;

proc entropy data = cens gme primal;
   priors intercept -32 32
          x1        -15 15
          x2        -15 15;
   model y = x1 x2 /
         esupports = (-25 1 25)
         censored(lb = 0, esupports=(-15 1 15) );
run;

proc qlim data=cens;
   model y = x1 x2;
   endogenous y ~ censored(lb=0);
run;