Hi @SophieCuvillier ,
Got you, I've had a try at putting something together for you that will run the make combined data table in a script - this was a fun challenge to get the platform to run all the columns into one window instead of individual windows per column.
Let me know how that works for you.
//Random Column Generator v1 - Inspired by https://www.linkedin.com/feed/update/urn:li:activity:7241062805292929025/
//Get current data table, clear previous selections
dt = CurrentDataTable();
Names Default to Here(1);
dt << Clear Column Selection();
//Launch dialog for columns - adapted from https://community.jmp.com/t5/JMPer-Cable/Prompting-for-columns-totally-modally/ba-p/189647
nw = New Window( "Launch Dialog",
<<Modal,
V List Box( Align( "right" ),
H List Box(
Panel Box( "Select Columns",
//Filter for continuous data only
clb = Filter Col Selector( dt, All,<<continuous(1), <<ordinal(0), <<nominal(0))
),
Panel Box( "Cast Selected Columns for Distribution",
Lineup Box( N Col( 2 ), Spacing( 5 ),
Button Box( "Columns",
clbY << Append( clb << Get Selected )
),
clbY = Col List Box(
"Numeric",
MinItems( 1 ),
MaxItems( 20 ),
nlines( 5 )
),
Button Box( "Remove",
clbY << Remove Selected
)
)
)
),
H List Box(
Button Box( "OK",
cols = clby << Get Items( "Column Reference" );
),
Button Box( "Cancel" )
)
)
);
//Test for cols names
Print(cols);
N = N Items(cols); //count the number of cols
distList = (""); //create a storage location to compile the script commands for each distribution
for(i = 1, i <= N, i++,
Insert Into(distList,
(
"Continuous Distribution(column(" || char(cols[i]) || "), Fit Normal(Goodness of Fit(1))),"
)
)
);
finalScript = "Distribution(" || distList || ");"; //combine the distlist with distribution cols with the distribution command
distribrep=eval(parse(finalscript));
//Target the first Anderson wilkes table
Firsttable=Report(distribrep)[char(cols[1]),"Fitted Normal Distribution","Goodness-of-Fit Test",TableBox(2)]
//Make a combined data table with the results
firsttable<<make combined data table;
“All models are wrong, but some are useful”