cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Tabulate - N categories ?

Tabulate and Tables/Summary are very similar, but ...
hey, Tabulate, what is the difference between counting numerical and non-numerical categories?

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Summary(
	Group( :age ),
	N Categories( :sex )
);

dt << Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :sex ), Statistics( N Categories ) ),
		Row Table( Grouping Columns( :age ) )
	)
);


Tables/Summary:
hogi_1-1719214892335.png

 

Tabulate: 

same settings, but Tabulate will fail and generate a warning:

hogi_2-1719214961320.png

hogi_0-1719214853066.png

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XIII

Re: Tabulate - N categories ?

dirty workaround: 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Tabulate(
	Transform Column(
		"sex_num",
		Formula( Col Rank( :sex, <<tie( minimum ) ) )
	),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N Categories ), Analysis Columns( :sex_num ) ),
		Row Table( Grouping Columns( :age ) )
	)
);

View solution in original post

4 REPLIES 4
hogi
Level XIII

Re: Tabulate - N categories ?

dirty workaround: 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Tabulate(
	Transform Column(
		"sex_num",
		Formula( Col Rank( :sex, <<tie( minimum ) ) )
	),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N Categories ), Analysis Columns( :sex_num ) ),
		Row Table( Grouping Columns( :age ) )
	)
);
hogi
Level XIII

Re: Tabulate - N categories ?

fun fact:
for header statistics, N unique (= N categories)  is available for categorical entries:

hogi_1-1719221895224.png

 

... but not for continuous ones:

hogi_0-1719221821707.png

 

Steffen_Bugge
Level IV

Re: Tabulate - N categories ?

Good point @hogi ! Why don't the N categories work in the Tabulate platform? Do you know if it exist a Wish List item to get this implemented?

hogi
Level XIII

Re: Tabulate - N categories ?

According to my records, there is no entry in the wish list.

happy news:
With JMP19, it's now MUCH easier to use the workaround with the dense rank:
 Col Score()
New in Graph Builder for JMP 19 

hogi_0-1758613858076.png

 

Tabulate(
	Transform Column( "Score Unique[sex]", Formula( Col Score( :sex ) ) ),
	Add Table(
		Column Table( Statistics( N Categories ), Analysis Columns( :sex) ),
		Column Table( Statistics( N Categories ), Analysis Columns( :"Score Unique[sex]"n ) ),
		Row Table( Grouping Columns( :age ) )
	)
);

Recommended Articles