Unfortunately, the Distribution platform does not provide the mode for an analytical function. I searched but could not find the formula for the mode of a Johnson distribution either.
Another approach is to use the JMP numerical optimizer to search for the solution. My approach is to use the Maximize() function to find the maximum density of the fitted distribution, which corresponds to the peak, and then use the Minimize() function to find the quantile the produces a probability closest to the maximum. Here is the solution in steps to match what you are trying to do.
- I opened the Injection Molding example from the Sample Data Directory.
- I opened the Distribution platform on the Shrinkage data column.
- I fit the Johnson SU distribution to obtain the Johnson SU parameter estimates.
- I wrote a script with two steps outlined above to find the peak location.
Here is the fitted distribution:
.The script is:
peak height = Maximize(
Johnson Su Density(
q, // quantile
-25.83224, // gamma or first shape parameter
1.5352821, // delta or second shape parameter
-3.912839, // theta or location parameter
2.5166e-6 // sigma or scale parameter
),
{ q( 0.01, 70 ) }
);
difference = Minimize(
peak height - Johnson Su Density(
q, // quantile
-25.83224, // gamma or first shape parameter
1.5352821, // delta or second shape parameter
-3.912839, // theta or location parameter
2.5166e-6 // sigma or scale parameter
),
{ q( 0.01, 70 ) }
);
Print( "The peak location is " || Char( q ) );
Notice that the estimates are copied into the function call, which is used twice.
Here is the result in the Log:
Don't be alarmed by all of the messages - it worked just fine! You can see the result at the bottom.