cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Steve_Kim
Level IV

JMP Script : Pareto plot - combine last causes

JMP Script : Pareto plot - combine causes

Hello?

I do like to combine Last 3 causes at Pareto plot.

In this case, how can I make script?

=====================================================

Names Default To Here( 1 );

dt = Open(

"$SAMPLE_DATA/Quality Control/Failure2.jmp"

);

obj = Pareto Plot( Cause( :failure ), Freq( :N ) );

Wait( 2 );

obj <<

Combine Causes(

{"miscellaneous", "silicon defect", "doping"}

);

=====================================================

I change the script as below, but it is not working.

Combine Causes( Last Causes (3) ) 

I appreciate your help in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JMP Script : Pareto plot - combine last causes

Currently, there is no scriptable method for Last Causes.  We will consider adding this in a future release.  In the meantime, you can generate the list of desired items to combine as shown below for JMP 11.

dt = Open( "$SAMPLE_DATA\Quality Control\Failure.jmp" );

/* Sort table by N */
dt << Sort( By( :N ), Order( Descending ), Replace Table );

lastCauses = 3;
combineList = {};
start = N Rows( dt ) - lastCauses + 1;

/* Build list for Last Causes */
For( i = start, i <= N Rows( dt ), i++,
Insert Into( combineList, Column( "failure" ) )
);

/* Use the list in Combine Causes  */

pPlot = dt << Pareto Plot(
Cause( :failure ),
Freq( :N ),
Combine Causes( combineList )
);

Wendy

View solution in original post

2 REPLIES 2

Re: JMP Script : Pareto plot - combine last causes

Currently, there is no scriptable method for Last Causes.  We will consider adding this in a future release.  In the meantime, you can generate the list of desired items to combine as shown below for JMP 11.

dt = Open( "$SAMPLE_DATA\Quality Control\Failure.jmp" );

/* Sort table by N */
dt << Sort( By( :N ), Order( Descending ), Replace Table );

lastCauses = 3;
combineList = {};
start = N Rows( dt ) - lastCauses + 1;

/* Build list for Last Causes */
For( i = start, i <= N Rows( dt ), i++,
Insert Into( combineList, Column( "failure" ) )
);

/* Use the list in Combine Causes  */

pPlot = dt << Pareto Plot(
Cause( :failure ),
Freq( :N ),
Combine Causes( combineList )
);

Wendy

Re: JMP Script : Pareto plot - combine last causes

These options have been on our to-do list for Pareto since this item was reported. Pareto is getting a huge set of improvements in JMP 17, and I am happy to report that these JSL options will be available as well. JMP 17 will be available in mid-2022. 

Recommended Articles