Subscribe Bookmark RSS Feed

frequencies

joechicago

Community Trekker

Joined:

Aug 10, 2011

I am trying to do something that would seem quite simple. I have a continous scale that I have divided into high, medium, and low (only for reporting purposes). I want to get grade in school x level frequency tables. Bu the only way I can get it to come out is with each separate numerical value, e.g., low-2.0; low-2.3; high-8.6, etc. And I wind up with as many categories as  have values. I just want the table to show high, medium, and low.

How do I do that?

1 REPLY
ms

Super User

Joined:

Jun 23, 2011

I am not sure what platform you used to make the frequency table, however I think Summary in Tables Menu would do the trick.

Open the Summary dialog and set e.g. School as "Group" and Level as "Subgroup" and click "Ok" (If you have mising values in the numerical grade column then you should select that column ant pick "N" under the "Statistics" dropdown menu).

Script example:

dt=New Table( "Example",

          Add Rows( 6 ),

  New Column( "Grade",

                    Numeric,

                    Continuous,

                    Format( "Best", 12 ),

                    Set Values( [1, 2, 1, 2, 1, 2] )

          ),

  New Column( "Level",

                    Character,

                    Nominal,

                    Set Values( {"low", "high", "low", "high", "low", "high"} )

          ),

  New Column( "School",

                    Character,

                    Nominal,

                    Set Values( {"A", "B", "A", "B", "B", "A"} )

          ),

          Set Row States( [0, 0, 1, 1, 1, 1] )

);

dt<<Summary(

          Group( :School ),

          N,

          Subgroup( :Level ),

          statistics column name format( "column" )

);