BookmarkSubscribeRSS Feed
Ann_JMP_User

Contributor

Joined:

Aug 28, 2018

Is it doable to write a script to do T test and Homogeneity of Variance automatically ?

Hi all,

 

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 ?

1 REPLY
Highlighted
ian_jmp

Staff

Joined:

Jun 23, 2011

Re: Is it doable to write a script to do T test and Homogeneity of Variance automatically ?

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)][1];
lCLdiff = repObj[NumberColBox(4)][2];
Print(uCLdiff, lCLdiff);

To understand how it works, consult 'Help > Books > Scripting Guide'.