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 14.4.1.
Output 14.4.1: Output From PROC ENTROPY
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 14.4.2.
Output 14.4.2: Output From PROC ENTROPY with PDATA= option
These results are identical to the ones produced by the previous PROC ENTROPY step.