cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
kaoticllama
Level II

How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

My current project has gotten great use out of the connecting letters report function produced by the Newman-Keuls means analysis. This function is found within the Oneway Analysis plots dropdown menu.

 

I am trying to automate a process which requires the Newman-Keuls connecting letters report to be generated for each subset within the overall dataset.

Is there a way to produce a connecting letters report without having to open up a Oneway chart, or without producing a new data table? If not, could someone point me in the right direction of how to find the formulas JMP is using to create the connecting letters report?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

Continuing @txnelson's thought, here's an example that makes a table:

NamesDefaultToHere(1);

// Get some data
dt = Open("$SAMPLE_DATA/Typing Data.jmp");

// Add a 'By' variable with 2 levels to dt (results are repeated)
n = NRow(dt);
dt << Concatenate(dt, AppendToFirstTable(1));
dt << NewColumn("By", Numeric, Nominal, Values(VConcat(Repeat(1, n), Repeat(2, n))));

// Do an invisible Oneway analysis
ow = dt << Oneway( Y( :speed ), X( :brand ), By(:By), Means( 1 ), All Pairs( 1 ), Invisible );

// Save the 'Connecting Letters' information for all levels of the 'By' variable
owRep = ow << Report;
dt2 = owRep[1][TableBox(5)] << make Combined Data Table;
dt2 << set Name("Connecting Letters");
owRep << close Window;

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

What is the output form you want the report to end up as?  JMP can easily produce the report in an invisible mode, and manipulate/move the contents where ever needed.  So if you can describe how you need access to the output, I am sure one or more community members can help you get there.

Jim
ian_jmp
Level X

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

Continuing @txnelson's thought, here's an example that makes a table:

NamesDefaultToHere(1);

// Get some data
dt = Open("$SAMPLE_DATA/Typing Data.jmp");

// Add a 'By' variable with 2 levels to dt (results are repeated)
n = NRow(dt);
dt << Concatenate(dt, AppendToFirstTable(1));
dt << NewColumn("By", Numeric, Nominal, Values(VConcat(Repeat(1, n), Repeat(2, n))));

// Do an invisible Oneway analysis
ow = dt << Oneway( Y( :speed ), X( :brand ), By(:By), Means( 1 ), All Pairs( 1 ), Invisible );

// Save the 'Connecting Letters' information for all levels of the 'By' variable
owRep = ow << Report;
dt2 = owRep[1][TableBox(5)] << make Combined Data Table;
dt2 << set Name("Connecting Letters");
owRep << close Window;
kaoticllama
Level II

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

Thank you Ian, this is very useful.

 

Is there a way to get the connecting letters report to show even when there are only two groups to compare? It seems JMP collapses plots with only two groups in the x-axis. I can get it to show manually, but can't seem to find a way implement it into a script.

jthi
Super User

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

Scripting Index might give a good idea:

jthi_0-1657372405829.png

You might have to change the part of script where you use Make Combined Data Table, but JMP is most likely able to script it for you (do it manually and then get script from table script).

-Jarmo
kaoticllama
Level II

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

Update:

To produce a table that includes the collapsed letters report, simply include "Connecting Letters Report ( 1 )" inside the "All Pairs" portion of the code to make the Oneway chart. See below...

NamesDefaultToHere(1);

// Get some data
dt = Open("$SAMPLE_DATA/Typing Data.jmp");

// Add a 'By' variable with 2 levels to dt (results are repeated)
n = NRow(dt);
dt << Concatenate(dt, AppendToFirstTable(1));
dt << NewColumn("By", Numeric, Nominal, Values(VConcat(Repeat(1, n), Repeat(2, n))));

// Do an invisible Oneway analysis
ow = dt << Oneway( Y( :speed ), X( :brand ), By(:By), Means( 1 ), All Pairs( 1, Connecting Letters Report ( 1 ) ), Invisible );

// Save the 'Connecting Letters' information for all levels of the 'By' variable
owRep = ow << Report;
dt2 = owRep[1][TableBox(5)] << make Combined Data Table;
dt2 << set Name("Connecting Letters");
owRep << close Window;
kaoticllama
Level II

Re: How do I get a Newman-Keuls Connecting Letters Report without opening a OneWay analysis chart?

The output I want will be in the form of several hundred Variability Charts in the same window. The charts will be plotting Time on the y-axis against Sites on the x-axis. The x-axis should group the sites based on the connecting letters report. I've attached an example.

 

So far the process has been very manual. I create a Oneway chart for the entire dataset, using many different groups in the by section. I make a subset of the data in each chart, and combine the subset with the letters report to get the raw data to be in the same table as the letters. Then I plot the Variability chart. You can imagine this would get tedious for several hundred Variability charts, so I am trying to automate the process in an efficient manner.