I'm trying to write a script to correctly calculate power for split-unit designs in the Custom Designer and Design Evaluator. The issue is that the correct degrees of freedom aren't used and while they can now be changed, each time the degrees of freedom or signal to noise ratio is changed the outline boxes for Power Analysis collapse and there's a lot of unnecessary button clicking going on. Also, I cannot determine how to calculate the Non-Centrality Parameter for split-unit designs so I can't just write a script to do the math from scratch. In JMP 10 the non-centrality parameter is a hidden column in the Power Analysis which I can get as a matrix.
What I want to be able to do is write a script that a user can run while in Custom Designer or Design Evaluator and have it calculate power for them using several signal to noise ratios all at once. To do this, my script needs to be able to change the signal to noise ratio in the JMP Platform and have CD or DE recalculate the NCP.
I can change the NumberColEditBox value, but I cannot get the Platform to recalcualte NCP.
win = Window("DOE - Custom Design"); //Connects to the window for testing purposes
win[OutlineBox(15)] << Close(0); //This is the Power Analysis outline box
win[NumberColBox(9)] << Hide(0); //This is the NCP column
ncp1 = win[NumberColBox(9)] << Get as Matrix; //Saves the NCP column
win[NumberColEditBox(4)] << SetValues([4]); //This changes the Signal to Noise Ratio value in the box to 4
How can I simulate an Enter keystroke to get the platform to recalculate?
I will note that when I change the value in the box from the script and just click in the box and hit Enter, nothing happens. When I then type in the number I just changed it to and hit Enter, nothing happens. If I then type in any other number, it works properly. (that sequence would be like, win[NumberColEditBox(4)] << SetValues([4]); hit enter, nothing -> Type 4 in the box, hit enter, nothing -> Type 3 in the box, hit enter, works)