Subscribe Bookmark RSS Feed

JMP Script : Pareto plot - combine last causes

jameskim

Community Trekker

Joined:

May 17, 2012

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
Solution

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
1 REPLY
Solution

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