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
- :
- Only three quantiles reported for fitted distribut...

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

Dec 15, 2014 9:23 AM
(1677 views)

Hi,

when you analyze the distribution of a sample of a continuous variable, you can customize the output to show upto ten quantiles using the "Custom Quantiles" option. But when you fit a distribution on the data, then you can only define three probabilities for the quantiles to be shown.

Is it possible to get more quantiles of the fitted distribution in any other way?

Thanks

Dave

1 ACCEPTED SOLUTION

Accepted Solutions

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

Dec 16, 2014 11:45 AM
(2988 views)

Solution

The user interface only provides up to three quantiles at a time. A script could be written to compute any number of quantiles and add the results in a a custom report to the Distribuiton platform. If your analysis is common, then it could incorporate launching the Distribution platform on the variable and either directly add the report for a pre-defined set of quantiles or first open a dialog with ten number entry boxes.

Learn it once, use it forever!

4 REPLIES

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

Dec 16, 2014 11:45 AM
(2989 views)

The user interface only provides up to three quantiles at a time. A script could be written to compute any number of quantiles and add the results in a a custom report to the Distribuiton platform. If your analysis is common, then it could incorporate launching the Distribution platform on the variable and either directly add the report for a pre-defined set of quantiles or first open a dialog with ten number entry boxes.

Learn it once, use it forever!

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

Dec 17, 2014 1:25 AM
(1494 views)

Hi Mark,

thanks for the tip. Unfortunately I have no experience with scripting. I have tried the following:

Open**(** "$SAMPLE_DATA/Diabetes.jmp" **)**;

Distribution (

** **** Continuous Distribution (**

Column**(** :BMI **)**,

Fit Distribution**(** Normal**(** Quantiles**(** **0.01**, **0.05**, **0.95**, **0.99** **)** **)** **)**

**)**

**)**;

but the results will only show the first three quantiles.

I hope you can elaborate a bit on the matter.

Best,

Dave

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

Dec 17, 2014 2:02 AM
(1494 views)

You need to calculate the quantiles "outside" the platform and then append them to the report. There are many ways to do this. Example:

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

dist = dt << **Distribution****(**

Continuous Distribution**(** Column**(** :BMI **)**, Fit Distribution**(** Normal**()** **)** **)**

**)**;

rdist = dist << **report**;

// Array of the desired percentiles

p = **[****0.99** **0.95** **0.90** **0.75** **0.5** **0.25** **0.10** **0.05** **0.01****]**;

// Get the parameters for fitted normal and calculate the quantiles

**{**mu, sigma**}** = rdist**[**Number Col Box**(** "Estimate" **)]** << **get**;

q = Normal Quantile**(** p, mu, sigma **)**;

// Add quantile table to report

rdist**[**Outline Box**(** "Parameter Estimates" **)]** << **append****(**

Table Box**(** Number Col Box**(** "Percentile", p **)**, Number Col Box**(** "Quantile", q **)** **)**

**)**;

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

Dec 18, 2014 3:08 AM
(1494 views)

Thanks ever so much MS! I see that it is a rather tought thing for a beginner to come up to. I have looked for information in

Just one final question, if you will allow me. Is it posible to do that to include other variables?. So for two variables (in this case BMI and BP), I manage to generate the distribution report and normal fitting, but the "extension" of the quantiles is only appended for the first variable. I see that "mu" and "sigma" are given the values for the first variable and the second variable is not included. I don`t seem to find the appropriate information in the scripting guide.

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

dist = dt << **Distribution(**

Stack**(** **1** **)**,

Column**(** :BMI **)**,

Horizontal Layout**(** **1** **)**,

Vertical**(** **0** **)**,

Outlier Box Plot**(** **0** **)**,

Normal Quantile Plot**(** **1** **)**,

Fit Distribution**(** Normal**(** Goodness of Fit**(** **1** **)** **)** **)**,

CV**(** **1** **)**,

Minimum**(** **1** **)**,

Maximum**(** **1** **)**,

Interquartile Range**(** **1** **)**

**)**,

Column**(** :BP **)**,

Horizontal Layout**(** **1** **)**,

Vertical**(** **0** **)**,

Outlier Box Plot**(** **0** **)**,

Normal Quantile Plot**(** **1** **)**,

Fit Distribution**(** Normal**(** Goodness of Fit**(** **1** **)** **)** **)**,

CV**(** **1** **)**,

Minimum**(** **1** **)**,

Maximum**(** **1** **)**,

Interquartile Range**(** **1** **)**

**)**;

rdist = dist << **report**;

p = **[****0.99** **0.95** **0.90** **0.75** **0.5** **0.25** **0.10** **0.05** **0.01]**;

**{**mu, sigma**}** = rdist**[**Number Col Box**(** "Estimate" **)]** << **get**;

q = Normal Quantile**(** p, mu, sigma **)**;

rdist**[**Outline Box**(** "Parameter Estimates" **)]** << **append(**

Table Box**(** Number Col Box**(** "Percentile", p **)**, Number Col Box**(** "Quantile", q **)** **)**

**)**;