cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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