Describing Qualitative Data

 

 

*--- SAS program: DESCRIBING_QUALITATIVE_DATA.SAS ;

 

*---Create Test Data;

 

data graduate;

  infile "c:\temp\graduate.csv" delimiter=',' firstobs=2;

  input id $ college $ gender $ degree $;

run;

 

*---Using PROC FREQ;

proc freq data=graduate;

  title 'Frequency of College';

  tables college gender;

run;

 

proc freq data=graduate;

  title 'Frequency of Gender';

  tables gender;

run;

 

proc freq data=graduate;

  title 'Cross Classification Table of Gender by College';

  tables gender*college;

run;

 

*---Using PROC CHART;

 

proc chart data=graduate;

  title 'Bar Chart of College';

  hbar college;

run;

 

proc chart data=graduate;

  title 'Relative Frequency of Degree';

  vbar degree / type = percent;

run;

 

proc chart data=graduate;

  title 'Relative Frequency of Degree';

  pie degree;

run;

 

 

Note

 

 

 

SAS Output

 

 

                      Frequency of College

 

                       The FREQ Procedure

 

                                      Cumulative    Cumulative

 college     Frequency     Percent     Frequency      Percent

 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

 Arts               3        6.00             3         6.00

 Business          15       30.00            18        36.00

 Jornalis          10       20.00            28        56.00

 Science           22       44.00            50       100.00

 

 

                                     Cumulative    Cumulative

  gender    Frequency     Percent     Frequency      Percent

  ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

  F               24       48.00            24        48.00

  M               26       52.00            50       100.00

 

                      Frequency of Gender

 

               Cross Tab of Gender by College

 

                     The FREQ Procedure

 

                 Table of gender by college

 

   gender     college

 

   Frequency‚

   Percent  ‚

   Row Pct  ‚

   Col Pct  ‚Arts    ‚Business‚Jornalis‚Science ‚  Total

   ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ

   F        ‚      1 ‚     10 ‚      4 ‚      9 ‚     24

            ‚   2.00 ‚  20.00 ‚   8.00 ‚  18.00 ‚  48.00

            ‚   4.17 ‚  41.67 ‚  16.67 ‚  37.50 ‚

            ‚  33.33 ‚  66.67 ‚  40.00 ‚  40.91 ‚

   ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ

   M        ‚      2 ‚      5 ‚      6 ‚     13 ‚     26

            ‚   4.00 ‚  10.00 ‚  12.00 ‚  26.00 ‚  52.00

            ‚   7.69 ‚  19.23 ‚  23.08 ‚  50.00 ‚

            ‚  66.67 ‚  33.33 ‚  60.00 ‚  59.09 ‚

   ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ

   Total           3       15       10       22       50

                6.00    30.00    20.00    44.00   100.00

 

 

                                                        Bar Chart of College

 

 college                                                                                                     Cum.              Cum.

                                                                                                       Freq  Freq  Percent  Percent

            ‚

 Arts       ‚************                                                                                 3     3     6.00     6.00

            ‚

 Business   ‚************************************************************                                15    18    30.00    36.00

            ‚

 Jornalis   ‚****************************************                                                    10    28    20.00    56.00

            ‚

 Science    ‚****************************************************************************************    22    50    44.00   100.00

            ‚

            Šƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆƒƒƒˆ

                1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18  19  20  21  22

 

                                                    Frequency

 

              Relative Frequency of Degree

 

    Percentage

 

    60 ˆ       *****

       ‚       *****

       ‚       *****

       ‚       *****

       ‚       *****

    50 ˆ       *****

       ‚       *****

       ‚       *****

       ‚       *****

       ‚       *****

    40 ˆ       *****

       ‚       *****

       ‚       *****

       ‚       *****

       ‚       *****

    30 ˆ       *****

       ‚       *****

       ‚       *****       *****

       ‚       *****       *****

       ‚       *****       *****

    20 ˆ       *****       *****

       ‚       *****       *****

       ‚       *****       *****

       ‚       *****       *****       *****

       ‚       *****       *****       *****

    10 ˆ       *****       *****       *****

       ‚       *****       *****       *****

       ‚       *****       *****       *****

       ‚       *****       *****       *****

       ‚       *****       *****       *****

       Šƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

             BACHELOR     MASTERS       PHD

 

                          Degree

 

                            Relative Frequency of Degree

 

                                Frequency of degree

 

 

 

                        BACHELOR   *************

                              *****             *****

                           ***                       ***

                        ***                             ***

                      **                                   **

                     *                                       *

                   **                                         **

                  *                                             *

                **                 30                            **

                *                60.00%                           *

               *                                                   *

              **                                                   **

              *                                                     *

             **                                                     **

             *                                                       *

             *                                                       *

             *                                                       *

             *                           ˆ  . . .. . .. . .. . .. . .*

             *                        .                              *

             *                      ..     ..                        *

             *                    .          .                       *

             **                 ..            .           7         **

              *              ..                ..      14.00%       *

              **          . .                    .                 **

               *         .                         .               *

                *     ..                            ..            *  PHD

                 * . .                13              .          *

                  *                 26.00%             .        *

                   **                                   .     **

                     *                                   ..  *

                      **                                   **

                        ***                             ***

                           ***                       ***

                              *****             *****

                                   *************

                                  MASTERS