Resources

Illustration of ODS Graphics

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

                    SAS Sample Library

        Name: entex05.sas
 Description: Example program from SAS/ETS User's Guide,
              The ENTROPY Procedure
       Title: Illustration of ODS Graphics
     Product: SAS/ETS Software
        Keys: Generalized Maximum Entropy
        PROC: ENTROPY
       Notes:

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

ods graphics on;

title "Test Scores compiled by Coleman et al. (1966)";
data coleman;
   input +3 test_score 6.2 teach_sal 6.2 prcnt_prof 8.2
            socio_stat 9.2 teach_score 8.2 mom_ed 7.2;
   label test_score="Average sixth grade test scores in observed district";
   label teach_sal="Average teacher salaries per student (1000s of dollars)";
   label prcnt_prof="Percent of students' fathers with professional employment";
   label socio_stat="Composite measure of socio-economic status in the district";
   label teach_score="Average verbal score for teachers";
   label mom_ed="Average level of education (years) of the students' mothers";
datalines;
   37.01   3.83   28.87     7.20   26.60   6.19
   26.51   2.89   20.10   -11.71   24.40   5.17
   36.51   2.86   69.05    12.32   25.70   7.04
   40.70   2.92   65.40    14.28   25.70   7.10
   37.10   3.06   29.59     6.31   25.40   6.15
   33.90   2.07   44.82     6.16   21.60   6.41
   41.80   2.52   77.37    12.70   24.90   6.86
   33.40   2.45   24.67    -0.17   25.01   5.78
   41.01   3.13   65.01     9.85   26.60   6.51
   37.20   2.44    9.99    -0.05   28.01   5.57
   23.30   2.09   12.20   -12.86   23.51   5.62
   35.20   2.52   22.55     0.92   23.60   5.34
   34.90   2.22   14.30     4.77   24.51   5.80
   33.10   2.67   31.79    -0.96   25.80   6.19
   22.70   2.71   11.60   -16.04   25.20   5.62
   39.70   3.14   68.47    10.62   25.01   6.94
   31.80   3.54   42.64     2.66   25.01   6.33
   31.70   2.52   16.70   -10.99   24.80   6.01
   43.10   2.68   86.27    15.03   25.51   7.51
   41.01   2.37   76.73    12.77   24.51   6.96
;

data coleman; set coleman;
   label test_score="";
   label teach_sal="";
   label prcnt_prof="";
   label socio_stat="";
   label teach_score="";
   label mom_ed="";
run;

data coleman;
   set coleman;
   if _n_ = 3 or _n_ = 18 then delete;
run;

proc entropy data=coleman;
   model test_score = teach_sal prcnt_prof socio_stat
                      teach_score mom_ed;
run;