Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
B_McCarty
Level I

Can I do calculations of statistics in a Tabulate Table?

Good Day,

I want to show the difference between two means in my tabulate table.

 

B_McCarty_0-1593186860833.png

I would like to have JMP do the math and report the difference of 0.11 in this table, perhaps as a new row or as a new table in this window. I have redacted names of rows and columns that don't matter for my question.

 

Thanks,

Blake

1 REPLY 1
Highlighted
pmroz
Super User

Re: Can I do calculations of statistics in a Tabulate Table?

You'll most likely need to save the tabulation as a data table and do your calculations with that.  Here's some JSL that will get you started:

dt = open("$sample_data\Big Class.jmp");

dtab = dt << Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :height ), Statistics( Mean ) ),
		Row Table( Grouping Columns( :sex ) )
	), invisible
);

mdt = dtab << Make Into Data Table;
dtab << close window(1);

mdt << add rows(1);

column(mdt, "sex")[3]          = "Diff";
column(mdt, "Mean(height)")[3] = column(mdt, "Mean(height)")[1] - column(mdt, "Mean(height)")[2];
Article Labels