cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
bitwalk
Level II

How to make script for Process Capability analysis with certain distribusion dynamically?

Atatched code and result are what I want to do with JSL on JMP 15, however this is hard-coded unfortunately. This does not work for other data with different distribution.
I want to know the way how to make the Process Capability analysis dynamically with best distribution in the followings:

 

  1. Y » Continuous Fit » Fit All
  2. Choose Top distribution (In this case, 'Top' is 'Weibull')
  3. Fitted 'Top' Distribution » Process Capability with spec limit (I am interested in Ppk value) 

 

dt = Open( "$SAMPLE_DATA/Quality Control/Engine Temperature Sensor.jmp" );
lsl = 80;
target = 100;
usl = 120;
obj = dt << Distribution(
	Continuous Distribution(
		Column( :Y ),
		Quantiles( 0 ),
		Summary Statistics( 0 ),
		Histogram( 0 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Fit Normal( Show Fit( 0 ) ),
		Fit Cauchy( Show Fit( 0 ) ),
		Fit Lognormal( Show Fit( 0 ) ),
		Fit Exponential( Show Fit( 0 ) ),
		Fit Gamma( Show Fit( 0 ) ),
		Fit Johnson( Show Fit( 0 ) ),
		Fit SHASH( Show Fit( 0 ) ),
		Fit Normal 2 Mixture( Show Fit( 0 ) ),
		Fit Normal 3 Mixture( Show Fit( 0 ) ),
		Fit Weibull( Process Capability( LSL( lsl ), Target( target ), USL( usl ) ) )
	)
);

Capture-20210126-03.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
David_Burnham
Super User (Alumni)

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

Depending on your JSL experience you might find it easier to script the Process Capability platform (under Quality and Process) rather than the Distribution platform.  It has a 'best fit' option:

 

dt = open("$SAMPLE_DATA/Semiconductor Capability.jmp");
dt << Process Capability( 
	Process Variables( :INM1 &Dist(Best Fit) ),
	Individual Detail Reports(1),
	Capability Index Plot( 0 ),
	Goal Plot( 0 ),
);
-Dave

View solution in original post

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

If you prefer to stay with the distribution platform, you can use the following code:

dt = Open( "$SAMPLE_DATA/Quality Control/Engine Temperature Sensor.jmp" );
lsl = 80;
target = 100;
usl = 120;
obj = dt << Distribution(
	Continuous Distribution(
		Column( :Y ),
		Quantiles( 0 ),
		Summary Statistics( 0 ),
		Histogram( 0 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Fit All(1)
	)
);
obj<<(Fit Handle["Best"]<<Process Capability( LSL( lsl ), Target( target ), USL( usl )));

View solution in original post

5 REPLIES 5
David_Burnham
Super User (Alumni)

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

It's easiest to think of it as a two-step procedure.  In the first step you fit the distributions (and don't do process capability).  From the fit statistics (and heuristic logic) you select the best distribution (personally I would stick with Normal, Lognormal and Weibull rather than consider all feasible distributions).  Once the distribution type is determined you can run the capability analysis for that specific distribution.

-Dave
David_Burnham
Super User (Alumni)

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

Depending on your JSL experience you might find it easier to script the Process Capability platform (under Quality and Process) rather than the Distribution platform.  It has a 'best fit' option:

 

dt = open("$SAMPLE_DATA/Semiconductor Capability.jmp");
dt << Process Capability( 
	Process Variables( :INM1 &Dist(Best Fit) ),
	Individual Detail Reports(1),
	Capability Index Plot( 0 ),
	Goal Plot( 0 ),
);
-Dave
bitwalk
Level II

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

Thank you very much for usuful information. This is what I wanted to do.

 

dt = Open( "$SAMPLE_DATA/Quality Control/Engine Temperature Sensor.jmp" );
lsl = 80;
target = 100;
usl = 120;
obj = dt << Process Capability(
	Process Variables( :Y & Dist( Best Fit ) ),
	Spec Limits( :Y( LSL( lsl ), Target( target ), USL( usl ) ) ),
	Individual Detail Reports( 1 ),
	Capability Box Plots( 1 ),
	Goal Plot( 0 ),
	Capability Index Plot( 0 ),
	Process Performance Plot( 0 ),
);

Capture-20210127-03.PNG

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

If you prefer to stay with the distribution platform, you can use the following code:

dt = Open( "$SAMPLE_DATA/Quality Control/Engine Temperature Sensor.jmp" );
lsl = 80;
target = 100;
usl = 120;
obj = dt << Distribution(
	Continuous Distribution(
		Column( :Y ),
		Quantiles( 0 ),
		Summary Statistics( 0 ),
		Histogram( 0 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Fit All(1)
	)
);
obj<<(Fit Handle["Best"]<<Process Capability( LSL( lsl ), Target( target ), USL( usl )));
bitwalk
Level II

Re: How to make script for Process Capability analysis with certain distribusion dynamically?

Thank you very much. This is also useful. I am happy I can choose several options.