I am trying to create my Save Estimates from my survival platform, then grab the estimates in the newly created table. The problem is that it will not wait until the Survival table is created before executing the Output expression. I have tried finish, wait, different orders, etc... and I cannot get this to work, any suggestions? I have JMP 16.0 with MacBook.
Names Default To Here( 0 );
Clear Log();
dt = Current Data Table();
If( Not( Is Scriptable( dt ) ),
dtsel = Pick File( "Open File", {"JMP|jmp", "All files|*"} );
If( dtsel == "",
Stop(),
Try( dt = Open( dtsel ), Stop() )
);
);
Sur = Expr(
Obj = dt << Survival(
Failure Plot( 1 ),
Show Points( 1 ),
Show Shaded Simultaneous CI( 1 ),
Show Simultaneous CI( 1 ),
Weibull Fit( 1 )
//Save Estimates
);
dtname = Data Table( dt ) << Get Name;
Show( dtname );
obj << Save Estimates;
wait(1);
);
Eval( Survival );
Output = Expr(
dt2 = Data Table( dtname || " Survival");
columnnamegroup = Column( dt2, 1 ) << Get Name;
Groups = Column( dt2, columnnamegroup ) << Get As Matrix;
Show( Groups );
);
Eval(Output);