Use of the PDATA= Option

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

                    SAS Sample Library

        Name: entex04.sas
 Description: Example program from SAS/ETS User's Guide,
              The ENTROPY Procedure
       Title: Use of the PDATA= Option
     Product: SAS/ETS Software
        Keys: Generalized Maximum Entropy
        PROC: ENTROPY
       Notes:

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

title "Using a PDATA= data set";
data a;
   array x[4];
   do t = 1 to 100;
      ys = -5;
      do k = 1 to 4;
         x[k] = rannor( 55372 )  ;
         ys = ys + x[k] * k;
      end;
      ys = ys + rannor( 55372 );
      output;
    end;
run;

proc entropy data = a gme primal;
   priors          x1  -10(2) 30(1)
                   x2  -20(3) 30(2)
                   x3  -15(4) 30(4)
                   x4  -25(3) 30(2)
            intercept  -13(4) 30(2) ;
   model ys = x1 x2 x3 x4 / esupports=(-25 0 25);
run;

data test;
   length Variable $ 12 Equation $ 12;
   input Variable $ Equation $ Nsupport Support Prior ;
datalines;
     Intercept   .  2 -13 0.66667
     Intercept   .  2  30 0.33333
            x1   .  2 -10 0.66667
            x1   .  2  30 0.33333
            x2   .  2 -20 0.60000
            x2   .  2  30 0.40000
            x3   .  2 -15 0.50000
            x3   .  2  30 0.50000
            x4   .  2 -25 0.60000
            x4   .  2  30 0.40000
;

proc entropy data=a gme primal pdata=test;
   model ys = x1 x2 x3 x4 / esupports=(-25 0 25);
run;