turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Platform Outputs into JSL Variables

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 8, 2014 8:32 AM
(1214 views)

Hello All

Can you pull factors/data/selections from a platform output into JSL?

I have what is currently 2 scripts that I would like to bring together. The first one imports an Excel file and creates a distribution script with "Fit Distribution (All)" so that the user can select the best type of fit and get the parameters. Can I get JSL to read what the user has selected and the parameters? I am thinking that I will need to create a new window via JSL with the distributions and fits (vs right now I send a script to the data table created by opening the Excel file and then run it) and then have a "proceed" button below it. I do not know what to have this button do in order to get what box is selected and the corresponding parameters, or note that no box is selected so I can run a random sampling or discrete sampling via a matrix vs a continuous fit function.

I am doing a Monte Carlo and need each of the types of fit and parameters to do the random function for each.

Thank you.

4 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 10, 2014 1:54 PM
(897 views)

Bump.

I want to get the data in red below back into JSL. I know how to have JSL create the below, but not to get the fit function(s) the user selected and then the paramters for that function back into JSL, for each distribution. Thanks.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 22, 2014 1:23 PM
(897 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 22, 2014 3:00 PM
(897 views)

Hi Claus,

I'm still working to figure out how to get which check box is checked.

However, if you're counting on JMP selecting the best fit, since we sort this table by ascending AICc it will always be the first one and something like this will work:

dt=open

("$SAMPLE_DATA/Big Class.jmp");dist= dt <<

Distribution(Continuous Distribution

(Column(:height), Fit Distribution(All))

);r=report

(dist);disttype=r

[outline box("Compare Distributions")][tablebox(1)][StringColBox(1)]<<get(1);paramMatrix=r

[outline box("?"||disttype)][outlinebox(1)][tablebox(1)][numberColBox(1)]<<get as matrix;paramList=r

[outline box("?"||disttype)][outlinebox(1)][tablebox(1)][numberColBox(1)]<<get;show

(disttype, paramMatrix, ParamList);

-Jeff

-Jeff

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 22, 2014 4:00 PM
(897 views)

There seems to exist an internal order of distributions that is maintained whatever the outcome of the automatic sorting. If that order is stable it can be hardcoded like in the example below. However, beware that the number of distributions as well as the order (and spelling?) may change in future versions of JMP.

This code works for me in JMP 11. The selected distributions and parameter estimates are stored in an associative array as keys and values respectively, but there are of course other options (e.g. data tables).

dt = Open**(** "$SAMPLE_DATA/Big Class.jmp" **)**;

dist = Distribution**(** Continuous Distribution**(** Column**(** :weight **)**, Fit Distribution**(** All **)** **)**, Histograms Only **)**;

// List of the distribution names in their "true" order

L = **{**"Normal", "LogNormal", "2 parameter Weibull", "Exponential", "Gamma", "Johnson Su", "Johnson Sl", "Generalized Logarithm", "Extreme Value",

"Normal 2 Mixture", "Normal 3 Mixture"**}**;

rdist = Report**(** dist **)**;

// Add button with script. Click after manual selection.

rdist << **prepend****(**

Button Box**(** "Click when done",

// Find the true position of selected items (not what the automatically sorted table shows)

m = **[]**;

For**(** i = **1**, i <= **11**, i++,

m = m || **(**rdist**[**Outline Box**(** "Compare Distributions" **)][****1****][****1****]** << **get****(** i **))**

**)**;

seldist = If**(** N Row**(** Loc**(** m **)** **)** > **1**,

L**[**Loc**(** m **)]**,

Eval List**(** **{**L**[**Loc**(** m **)]}** **)**

**)**; // Selected distribution(s)

aa = Associative Array**()**; // For storing parameter estimates

// Insert values

For**(** i = **1**, i <= N Row**(** Loc**(** m **)** **)**, i++,

aa << **insertitem****(** seldist**[**i**]**, Matrix**(** rdist**[**Outline Box**(** "Fitted " || seldist**[**i**]** **)][**Number Col Box**(** "Estimate" **)]** << **get** **)** **)**

**)**;

Show**(** Seldist **)**;

Show**(** aa **)**;

**)**

**)**;