In this video, you learn how to combine scripts for different analyses into one script using the file Impurity for Scripts.jmp.
Scripts for three analyses have been saved to the data table.
To start, we run the three saved scripts, one at a time. This produces distribution output for Impurity and Outcome, box plots for Impurity and Reactor, and a mosaic plot for Outcome and Reactor.
Let’s say that, instead of running individual scripts for the three analyses, we want to have one script that runs all three analyses.
This can be a time-saver if you frequently run the same analyses.
First, we’ll save the script for the Distribution analysis to a script window. To do this, we click the red triangle for Distribution, and select Save Script and then To Script Window.
JMP produces a script window, with the JSL code for re-creating the analysis.
Notice that the script ends with a semicolon. The semicolon tells JMP where one script ends and another begins.
Now let’s add a second script. In the analysis with the box plots, we again select Save Script, To Script Window.
This script is added to the bottom of the open script window.
Finally, we’ll add the script for the mosaic plot.
We’ll close the three analyses. Now, when we run our script, all three analyses are run.
We can save this combined script as a JSL file. This is useful if we want to run this script on a different data set that has the same variables.
Instead, we’ll add this script to our data table.
To do this, we copy the entire script. Then, in our data table, we click the top red triangle and select New Script.
We paste the script in the Script panel and give the script a name. We’ll call it Impurity Analysis.
Now, when we click the green triangle to run the script, all three analyses are produced.
However, these analyses are in separate windows.
If we want all three analyses to appear in one window instead of separate windows, we can create a simple dashboard.
Let’s see how to do this.
First, we position and resize the windows as we’d like them to appear in the dashboard.
Then, we select Combine Windows from the Window menu.
We’ll select the three analysis windows and click OK.
Now the linked analyses appear in one window. When you select values in one graph, the corresponding values are selected in the other graphs. This is much more efficient than having output in three separate windows.
We can save the script for the dashboard to the data table. When we run this script, the interactive dashboard is produced.