cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Djtjhin
Level IV

Simple Script to create distribution for all columns in a data table

Is there a simple script that creates distribution of all the columns in a data table ? 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Simple Script to create distribution for all columns in a data table

One way to do it:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
//dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
colNames = dt << Get Column Names("String");
dist = Eval(EvalExpr(dt << distribution(Column(Expr(colNames)))));

 

But I would think @dale_lehman suggestion would be better in most cases. At least JMP15 provides distributions below column names

jthi_0-1615040638864.png

or use Column Viewer as it gives additional information in easy to see format and allows quick creation of distributions.

jthi_1-1615040861333.png

 

 

-Jarmo

View solution in original post

5 REPLIES 5
dale_lehman
Level VII

Re: Simple Script to create distribution for all columns in a data table

I'm sure someone will give you such a script - but why isn't the display that appears just below the variable name sufficient?  And, if you want the statistics (e.g., means, standard deviations, etc.) you can use either the Column Viewer - summary or select all distributions and then make a combined data table.  Of course, those scripts can be saved to the data table, so JMP will write the scripts (sorry, but I'm allergic to writing scripts if I can avoid them).

jthi
Super User

Re: Simple Script to create distribution for all columns in a data table

One way to do it:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
//dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
colNames = dt << Get Column Names("String");
dist = Eval(EvalExpr(dt << distribution(Column(Expr(colNames)))));

 

But I would think @dale_lehman suggestion would be better in most cases. At least JMP15 provides distributions below column names

jthi_0-1615040638864.png

or use Column Viewer as it gives additional information in easy to see format and allows quick creation of distributions.

jthi_1-1615040861333.png

 

 

-Jarmo
Djtjhin
Level IV

Re: Simple Script to create distribution for all columns in a data table

Thanks @jthi@dale_lehman

A little bit of background before I explain why I'm going the scripting route. So I made a script which execute unique monte-carlo simulation for each row in a data table. But instead of saving the exact table of random samples created, I saved the script which generates the samples as strings which can be parsed in the future if needed. Though I lose the ability to save the exact table, but at least I avoid having to manage large datasets. 

Now with the step above completed, what's missing is generating the distribution and that's the reason why I'm asking for a way to script the distributions. It's mainly to straightaway review the monte-carlo samples distribution. 

 

Having that said, I am aware of the functionalities you mentioned and I agree that those approach are more ideal. However, I'm also building JMP tools which can help more folks within my organization to adopt JMP (which is admittedly so, still not much). Hopefully, as other users become more experienced, they realize other available JMP in-build tools which can help them analyze the data better. 

Raaed
Level IV

Re: Simple Script to create distribution for all columns in a data table

PLEASE, HOW TO GET THIS OUTPUT WITH OUT SCRIPTS.

Řaëd ~✍

Re: Simple Script to create distribution for all columns in a data table

  1. Open the data table.
  2. Select Analyze > Distribution.
  3. Select all the columns in the list on the left side.
  4. Click Y.
  5. Click OK.

Please see Distribution chapter in the Basic Analysis guide.