Example 13.4 Use of the PDATA= Option

It is sometimes useful to specify priors and supports by using the PDATA= option. This example illustrates how to create a PDATA= data set which contains the priors and support points for use in a subsequent PROC ENTROPY step. In order to have a model to estimate in PROC ENTROPY, you must first have data to analyze. The following DATA step generates the data used in this analysis:

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;

Next you fit this data with some arbitrary parameter support points and priors by using the following PROC ENTROPY statements:

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;

These statements produce the output shown in Output 13.4.1.

Output 13.4.1 Output From PROC ENTROPY
Using a PDATA= data set

The ENTROPY Procedure

GME Variable Estimates
Variable Estimate Approx Std Err t Value Approx
Pr > |t|
x1 1.195688 0.1078 11.09 <.0001
x2 1.844903 0.1018 18.12 <.0001
x3 3.268396 0.1136 28.77 <.0001
x4 3.908194 0.0934 41.83 <.0001
intercept -4.94319 0.1005 -49.21 <.0001

You can estimate the same model by first creating a PDATA= data set, which includes the same information as the PRIORS statement in the preceding PROC ENTROPY step.


A data set that defines the supports and priors for the model parameters is shown in the following statements:

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
;

The following statements reestimate the model by using these support points.

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

These statements produce the output shown in Output 13.4.2.

Output 13.4.2 Output From PROC ENTROPY with PDATA= option
Using a PDATA= data set

The ENTROPY Procedure

GME Variable Estimates
Variable Estimate Approx Std Err t Value Approx
Pr > |t|
x1 1.195686 0.1078 11.09 <.0001
x2 1.844902 0.1018 18.12 <.0001
x3 3.268395 0.1136 28.77 <.0001
x4 3.908194 0.0934 41.83 <.0001
Intercept -4.94319 0.1005 -49.21 <.0001

These results are identical to the ones produced by the previous PROC ENTROPY step.


Note: This procedure is experimental.