cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Improve consistency of distribution names in platforms, functions, etc.

Hi.  I've been writing scripts to automate visualization of distributions, fitting distributions, and reporting cpk.  I just finished a long one, and really found a lot of disparities in how the names of some distributions must be used.  This required a significant amount of debugging.  My ask is not a small one, but I would love if JSL could make usage of distribution names more consistent in order to make writing scripts more efficient and less confusing.  I will provide examples below.

 

My script takes a list of distribution names {"Exponential", "Normal 2 Mixture", "Johnson SU", ...} and first generates a table of random data with one column for each distribution.  It then creates distribution plots, fits the data, extracts the fit parameters for each distribution.  It also uses the Process Capability platform to compute cpk.  I rely a lot on creating JSL Quotes then substitution of the desired distribution name to get the exact code I need.

 

Issues:

  • When I want to generate matrices of random data initially, I need to use "Exp" instead of "Exponential" and "Normal Mixture" instead of "Normal 2 Mixture". 
    J(100, 1, RandomExp(...));
    J(100, 1, RandomNormalMixture(...));
    J(100, 1, RandomJohnsonSB(...));
  • On the other hand, to fit a distribution to my data, I need to use "Exponential" instead of "Exp", "Normal 2 Mixture" instead of "Normal Mixture" and "Johnson" instead of "Johnson  SB":
  • dt << Distribution(
    	Continuous Distribution(
    		Column(:colname1),
    		Fit Exponential,
    		Fit Normal 2 Mixture,
    		Fit Johnson
    	)
    ) 
  • And again another naming scheme for the Normal 2 Mixture in the Process Capability platform:
    pc = dt << Process Capability(
    	Process Variables(
    		:colname1 & Dist(Exponential),
    		:colname2 & Dist(Mixture of 2 Normals),
    		:colname3 & Dist(Johnson),
    	)
    )

I had initially hoped I could just provide my script a list of distribution names to try, then have a for loop cycle through the list, adding the specific name to a JSL Quote, and then executing.  Instead I found out the hard way that I needed to create several if clauses to fix the distribution names for each different operation prior to substitution.

 

It would be great if all of this could be simplified by just using one set of distribution names for all functions and platforms.  Thanks.

 

[Using JMP Pro 17.2.0]