Is it doable to write a script to do T test and Homogeneity of Variance automatically ?
Sep 13, 2018 11:30 PM(1105 views)
I was thinking of doing a script to compare 2 distributions of several test parameters automatically using T test based on the inputs from the data table. I guess looping the parameters to be compared beween both X variables could be done by script, but I am not too sure is there anyway to activate the T test in JMP using script ?
You can try this kind of approach (where your final script would loop over the columns you need, rather than use :Height):
Names Default To Here( 1 );
// Do a t Test
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = Oneway( Y( :Height ), X( :sex ) );
obj << t Test( 1 );
// See how the report is composed
repObj = Report(obj);
repObj << showTreeStructure;
// Dig out the upper and lower values for the confidence interval
uCLdiff = repObj[NumberColBox(4)];
lCLdiff = repObj[NumberColBox(4)];
To understand how it works, consult 'Help > Books > Scripting Guide'.