In this section, we provide you with details relating to three items, two of which were mentioned in the case study. The first subsection gives a description of a script that provides the number of unique levels for each variable and saves these levels to Column Info. The second subsection explains how to save a script to create a summary table to the main data table, as is done in the data table PharmaSales.jmp. The third subsection sketches how to create a formula for a year-to-date summation.
As we have seen, some of the nominal variables in the PharmaSales.jmp data table have a large number of levels, which makes studying their bar graphs difficult. The data table PharmaSales.jmp contains a script called Unique Levels that produces a table that gives the counts of the number of distinct levels of each variable, sorting the columns in order of decreasing frequency relative to the number of levels. For each variable, the script also places these levels into the Column Info dialog as a column property. When nominal variables have a large number of levels, this script can be useful as a preliminary data check.
When you run this script, the table in Exhibit 7.64 appears.
Also, you will note that in PharmaSales.jmp asterisks appear next to ...