Since this is the first time to use JMP, I will try to describe my problem in the language of JMP script. Briefly, I have a data table, within which, there exist a "slice" column, and I want to generate the design matrix based on the slice column, and also generate some other columns based on the design matrix. What I need to do is to develop a JMP add-in which implements this task, so that other colleagues can also use my add-in for computer experiments.
First, I would like to develop a window to select the slice column, and generate a data table including the slice column and the design matrix, and save the formula to automatically update the design matrix if some values in the slice column are changed later. ( I need to save formula , because my project manager requested it, but I could convince him without using the formula columns if I come up with a better solution.)
Now, I can create the window, and generate the data table which includes the sliced column and design matrix, but the design matrix cannot be updated if I change the values in the slice column.
Regarding the sliced column:
I know that the design function in JMP can automatically generate the design matrix, but it's not helpful if I want formula columns. So I wrote my own function to generate my design matrix, as shown in my script. Suppose that I have the slice column a = [1, 1, 2, 3]'. Then the design matrix will be generated as
1 0 0
1 0 0
0 1 0
0 0 1.
The sliced column can be vary large, and hence it's difficult to know how many columns will the design matrix have by manually looking at the slice column. Besides, the values in the sliced column can be modified arbitrarily.
I think the key steps to create generate the design matrix are the following:
1. select the sliced column, click the button "OK", then a new table will be generated, which includes the slice column and design matrix. Clearly, this step involves manually intervention.
2. If I modify some values in the slice column in the new table manually, then the original design matrix will be deleted automatically, and the corresponding new design matrix will be generated.
Second, I also need to generate some columns based on the design matrix, and I also wrote out the script to generate them, but I do not know how to save them as formula columns. This issue will not be a problem if I know how to save the formula columns for design matrix.
Last, if I succeeded to create the design matrix and some columns, then I would package them as a add-in, and test it under many different circumstance.
Thanks for your suggestion. Let me know if I make myself understood.
Pulong