Subscribe Bookmark RSS Feed

Help with JMP script to automate the Screening Platform

doodles

Community Trekker

Joined:

Oct 13, 2011

I am trying to find the relationships between lots of variables, and have found that the Screening Platform does a good job in a lot less time than stepwise regression. Now I am trying to automate the process of assigning the variables to roles, running the Screening Platform on them, turning the ouput into a data table, and then saving that data table. I have already basically done this in the case of stepwise regression, but I find that the Screening Platform doesn't seem to work like that. First of all, there seems to be no way for me to get the tree diagram for the launcher so I can press the "OK" button. Then, I don't see how I can send a message to generate a report that I can then manipulate. Is this possible? To clarify, below is the script I developed for automating the stepwise regression platform. I basically want to swap out the stepwise for screening. I don't think that is actually possible, but I am really struggling to find alternative ways of doing it (to the point of trying to hack together an ugly and unreliable solution using AutoHotKey!). Thanks in advance for any assistance.

dt=Open("C:\testtable.jmp");

cc=dt <<Get Column Names;

ncols = N Items(cc);

For(i=1, i<=ncols, i++, Current Data Table(dt);

For(j=1, j<=ncols, j++,if( cc!=cc, cc <<Preselect Role(X),cc<<Preselect Role(Y));

);

sw = Fit Model(

Personality( Stepwise ),

No Intercept,

Run( Stopping Rule( "Minimum AICc" )));

sw<<Go;

Wait(1800);

repsw = sw<< Report;

reptb = repsw[TableBox(2)]<< make Data Table;

reptb << Sort( By( :Name( "\!"F Ratio\!"" ) ), Order( Descending ) ,Replace Table);

  reptb << Save As("C:\"||cc||".csv", Text);

reptb << close window;

repsw << close window;

);

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Open("$SAMPLE_DATA/Big Class.jmp");

// in this example the columns are assigned to lists

// that identify their role.  The lists could be constructed

// based on the organisation of the table or from a user input

// from a column dialog window

yRole = {:height};

xRole = {:weight, :age, :sex};

// construct a string representation of the screening command

// and substitute the column roles

cmd = Eval Insert( "\[

 

          s = Screening( Y(^yRole^), X(^xRole^) )

 

]\");

//Execute the command

Eval(Parse(cmd));

// reference the screening window

sr = s << report;

// extract the table results

// (use sr << show tree structure to idenitfy the display boxes)

t = sr[TableBox(1)];

// send message to convert display box to a table

dt = t << Make Into Data Table;

// close the screening report window

s << Close Window;

-Dave
3 REPLIES
Solution

Open("$SAMPLE_DATA/Big Class.jmp");

// in this example the columns are assigned to lists

// that identify their role.  The lists could be constructed

// based on the organisation of the table or from a user input

// from a column dialog window

yRole = {:height};

xRole = {:weight, :age, :sex};

// construct a string representation of the screening command

// and substitute the column roles

cmd = Eval Insert( "\[

 

          s = Screening( Y(^yRole^), X(^xRole^) )

 

]\");

//Execute the command

Eval(Parse(cmd));

// reference the screening window

sr = s << report;

// extract the table results

// (use sr << show tree structure to idenitfy the display boxes)

t = sr[TableBox(1)];

// send message to convert display box to a table

dt = t << Make Into Data Table;

// close the screening report window

s << Close Window;

-Dave
doodles

Community Trekker

Joined:

Oct 13, 2011

Hi, thank you very much for your reply, and sorry about my delay in responding. I appreciate your help.

leanpharma_gmai

Community Trekker

Joined:

Oct 28, 2011

Dave,

Can you teach us how to use JSL to prompt user to  input to choose X and Y from a column dialog window ?

Thanks, Kun.