cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
waltp
Level I

Adding percentages using Tabulate in JMP

Hi,

I want to create a table using Tabulate in JMP 10. The table has three grouping variables: Product (at two levels), Test Code (at 7 levels), and Rating Category for each code (at 3 levels). Rating Category is nested under Test Code which is nested under Product. The analysis column is an Overall Liking rating for the products. The table I want has the three grouping variables, the mean for Overall Liking, and the percent of people in each Product/Code/Category group. How do I get the percent in each group?  To illustrate, I may have something like:

ProductCodeRatingOverall Mean
P1A1T2B3.2
Neutral4.3
B2B2.3
All4.0
A2T2B3.0
Neutral2.5
B2B3.5
All3.7


I want to add a column that shows the percent of people responding for each level of Rating for Code A1, Product P1. The percents should sum to 100. Then have this repeat for the next combination of Product/Code and Ratings. So the first two sets should be:

ProductGroupRatingOverall Mean Percent Respondents
P1A1T2B3.225%
Neutral4.335%
B2B2.345%
All4.0100%
A2T2B3.025%
Neutral2.525%
B2B3.550%
All3.7100%


How can I do this either using Tabulate or in a script (the script is preferable)?

Any help is appreciated.

Walt Paczkowski

1 ACCEPTED SOLUTION

Accepted Solutions
chungwei
Staff (Retired)

Re: Adding percentages using Tabulate in JMP

Tabulate(

  Change Item Label( Statistics( Mean, "Overall Mean" ) ),

  Set Format( Name( "% of Total" )(9, 2) ),

  Add Table(

  Column Table( Statistics( Name( "% of Total" )(:Rating) ) ),

  Column Table( Analysis Columns( :X ), Statistics( Mean ) ),

  Row Table(

  Grouping Columns( :Product, :Group, :Rating ),

  Add Aggregate Statistics( :Rating )

  )

  )

);

View solution in original post

2 REPLIES 2
chungwei
Staff (Retired)

Re: Adding percentages using Tabulate in JMP

Tabulate(

  Change Item Label( Statistics( Mean, "Overall Mean" ) ),

  Set Format( Name( "% of Total" )(9, 2) ),

  Add Table(

  Column Table( Statistics( Name( "% of Total" )(:Rating) ) ),

  Column Table( Analysis Columns( :X ), Statistics( Mean ) ),

  Row Table(

  Grouping Columns( :Product, :Group, :Rating ),

  Add Aggregate Statistics( :Rating )

  )

  )

);

chungwei
Staff (Retired)

Re: Adding percentages using Tabulate in JMP

I meant to add this to the script I added in my previous reply,

To get the specific percentage you want, you need to tell Tabulate the denominator. You do that by qualifying the statistics key word "% of Total" with the grouping column(s).