Previous Page | Next Page

The TABULATE Procedure

Example 4: Using Multilabel Formats


Procedure features:

CLASS statement options:

MLF

PROC TABULATE statement options:

FORMAT=

TABLE statement

ALL class variable

concatenation (blank) operator

crossing (*) operator

grouping elements (parentheses) operator

label

variable list

Other features:

FORMAT procedure

FORMAT statement

VALUE statement options:

MULTILABEL


This example


Program

 Note about code
options nodate pageno=1 linesize=80 pagesize=64;
 Note about code
data carsurvey;
   input Rater Age Progressa Remark Jupiter Dynamo;
   datalines;
1   38  94  98  84  80
2   49  96  84  80  77
3   16  64  78  76  73
4   27  89  73  90  92

. . . more data lines . . . 

77   61  92  88  77  85
78   24  87  88  88  91
79   18  54  50  62  74
80   62  90  91  90  86
;
 Note about code
proc format;
   value agefmt (multilabel notsorted)
         15 - 29 = 'Below 30 years'
         30 - 50 = 'Between 30 and 50'
       51 - high = 'Over 50 years'
         15 - 19 = '15 to 19'
         20 - 25 = '20 to 25'
         25 - 39 = '25 to 39'
         40 - 55 = '40 to 55'
       56 - high = '56 and above';
run;
 Note about code
proc tabulate data=carsurvey format=10.;
 Note about code
   class age / mlf;
 Note about code
   var progressa remark jupiter dynamo;
 Note about code
   table age all, n all='Potential Car Names'*(progressa remark 
      jupiter dynamo)*mean;
   
 Note about code
   title1 "Rating Four Potential Car Names";
   title2 "Rating Scale 0-100 (100 is the highest rating)";
 Note about code
   format age agefmt.;
run;

Output

                        Rating Four Potential Car Names                        1
                 Rating Scale 0-100 (100 is the highest rating)

  ---------------------------------------------------------------------------
  |                  |          |            Potential Car Names            |
  |                  |          |-------------------------------------------|
  |                  |          |Progressa |  Remark  | Jupiter  |  Dynamo  |
  |                  |          |----------+----------+----------+----------|
  |                  |    N     |   Mean   |   Mean   |   Mean   |   Mean   |
  |------------------+----------+----------+----------+----------+----------|
  |Age               |          |          |          |          |          |
  |------------------|          |          |          |          |          |
  |15 to 19          |        14|        75|        78|        81|        73|
  |------------------+----------+----------+----------+----------+----------|
  |20 to 25          |        11|        89|        88|        84|        89|
  |------------------+----------+----------+----------+----------+----------|
  |25 to 39          |        26|        84|        90|        82|        72|
  |------------------+----------+----------+----------+----------+----------|
  |40 to 55          |        14|        85|        87|        80|        68|
  |------------------+----------+----------+----------+----------+----------|
  |56 and above      |        15|        84|        82|        81|        75|
  |------------------+----------+----------+----------+----------+----------|
  |Below 30 years    |        36|        82|        84|        82|        75|
  |------------------+----------+----------+----------+----------+----------|
  |Between 30 and 50 |        25|        86|        89|        81|        73|
  |------------------+----------+----------+----------+----------+----------|
  |Over 50 years     |        19|        82|        84|        80|        76|
  |------------------+----------+----------+----------+----------+----------|
  |All               |        80|        83|        86|        81|        74|
  ---------------------------------------------------------------------------

Previous Page | Next Page | Top of Page