cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
peter_t
Level I

Control chart alarms when no variation in data

I have a script where we generate control charts for a lot of parameters. For some parameters there is no variation in the data (e.g. all data are below detection limit). For these parameters with no variation all samples show warnings, e.g. Test 1 (One point beyond Zone A). 

These warnings/alarms don't make sense in our situation. Is there a trick such that I can avoid warnings when there is no variation in data?

 

An example is shown in the control chart below generated from the script attached:

peter_t_1-1643892485749.png

 

 

// Make data table with no variation and set spec limits
dt = New Table( "Control chart data",
	Add Rows( 20 ),
	New Column( "x", Numeric, "Continuous") 
	);
ForEachRow(x=0.1);
dt:x << Set Property("Spec Limits", {LSL( 0 ), USL(1 ),  Show Limits( 1 )} );

// Make Individual control chart with Test 1
dt << Control Chart Builder(
	Show Two Shewhart Charts( 0 ),
	Show Control Panel( 0 ),
	Show Alarm Report( 1 ),
	Variables( Y( :x ) ),
	Chart(
		Points( Statistic( "Individual" ) ),
		Limits( Sigma( "Levey Jennings" ), Spec Limits( 0 ) ),
		Warnings( Test 1( 1 ) )
	)
);

 

I am using JMP 15.0.

 

Peter

1 ACCEPTED SOLUTION

Accepted Solutions
SDF1
Super User

Re: Control chart alarms when no variation in data

Hi @peter_t ,

 

  This might not be the most elegant way of going about your solution, but for each of the processes that you are running this on, you can check if the standard deviation is 0, and if so, set the Boolean value for showing performing a test and/or the alarm report to 0. You could also wrap the entire control chart in a Boolean such that if the test value is 0 then you don't perform the control chart -- since a control chart doesn't really make sense for a process that is always constant. Anyway, take a look at the code below and see how I substitute in the test value Boolean TestV.

Names Default To Here( 1 );

// Make data table with no variation and set spec limits
dt = New Table( "Control chart data", Add Rows( 20 ), New Column( "x", Numeric, "Continuous" ) );
dt:x << Set Each Value( 0.1 );
dt:x << Set Property( "Spec Limits", {LSL( 0 ), USL( 1 ), Show Limits( 1 )} );

//test if standard deviation is 0, if so, set test value to 0
xstdev = Col Std Dev( :x );
If( xstdev == 0,
	TestV = 0,
	TestV = 1
);


// Make Individual control chart with Test 1
dt << Control Chart Builder(
	Show Two Shewhart Charts( 0 ),
	Show Control Panel( 0 ),
	Eval( Substitute( Expr( Show Alarm Report( _Test_V ) ), Expr( _TestV_ ), TestV ) ),
	Variables( Y( :x ) ),
	Eval(
		Substitute(
				Expr(
					Chart(
						Points( Statistic( "Individual" ) ),
						Limits( Sigma( "Levey Jennings" ), Spec Limits( 0 ) ),
						Warnings( Test 1( (Expr( _TestV_ )) ) )
					)
				),
			Expr( _TestV_ ), TestV
		)
	)
);

Hope this helps!,

DS

 

P.S. I had to change the Set Each Value command in your code so that it correctly populated the rows.

View solution in original post

2 REPLIES 2
SDF1
Super User

Re: Control chart alarms when no variation in data

Hi @peter_t ,

 

  This might not be the most elegant way of going about your solution, but for each of the processes that you are running this on, you can check if the standard deviation is 0, and if so, set the Boolean value for showing performing a test and/or the alarm report to 0. You could also wrap the entire control chart in a Boolean such that if the test value is 0 then you don't perform the control chart -- since a control chart doesn't really make sense for a process that is always constant. Anyway, take a look at the code below and see how I substitute in the test value Boolean TestV.

Names Default To Here( 1 );

// Make data table with no variation and set spec limits
dt = New Table( "Control chart data", Add Rows( 20 ), New Column( "x", Numeric, "Continuous" ) );
dt:x << Set Each Value( 0.1 );
dt:x << Set Property( "Spec Limits", {LSL( 0 ), USL( 1 ), Show Limits( 1 )} );

//test if standard deviation is 0, if so, set test value to 0
xstdev = Col Std Dev( :x );
If( xstdev == 0,
	TestV = 0,
	TestV = 1
);


// Make Individual control chart with Test 1
dt << Control Chart Builder(
	Show Two Shewhart Charts( 0 ),
	Show Control Panel( 0 ),
	Eval( Substitute( Expr( Show Alarm Report( _Test_V ) ), Expr( _TestV_ ), TestV ) ),
	Variables( Y( :x ) ),
	Eval(
		Substitute(
				Expr(
					Chart(
						Points( Statistic( "Individual" ) ),
						Limits( Sigma( "Levey Jennings" ), Spec Limits( 0 ) ),
						Warnings( Test 1( (Expr( _TestV_ )) ) )
					)
				),
			Expr( _TestV_ ), TestV
		)
	)
);

Hope this helps!,

DS

 

P.S. I had to change the Set Each Value command in your code so that it correctly populated the rows.

peter_t
Level I

Re: Control chart alarms when no variation in data

Thanks. This works.