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

Standardizing Chart Displays Across the BY role

Hi Everyone, 

 

I'm currently using the control chart builder to produce X-Bar S Charts of measurements from a final control system.  I've created something I quite like.

 

peterrow_0-1674815363795.png

So I have a Box plot of the measurement for each of the test machines.  Quite useful for answering the question "Is there a problem with the test machine or the product being tested?".

 

The problem I have is that I have each the variable "Product" cast in the BY role, so I get one of these charts for each product.  There are a lot of products.  To get the box plots, I used the control panel, but this only changes the format of one chart.  I would like to change the format across all of them.

 

On the same subject I would also like to apply a local data filter across all of them and face the same issue.  The filter only works on the single chart it is selected.  Yes, here, at a pinch I could use the global data filter, but I would like to toggle between the filters easily and not affect any other open analyses.

 

Any ideas?

5 REPLIES 5

Re: Standardizing Chart Displays Across the BY role

For your first question, two possible options:

1. Adding the box plots before you make add the By variable in the Control Chart Builder will avoid the need to add this to each individual graph.

2. If you're comfortable with scripting, you can add this to the script (example below).

 

For your second question, I'm not sure of a better solution than the global data filter, but others on the community might have better ideas.

Names Default To Here (1);
//set up data table
dt = open ("$SAMPLE_DATA/quality control/airport.jmp");
dt << new column ("By", formula (Random Integer(3)));

//run control chart
dt << Control Chart Builder(
	Variables( Subgroup( :Day ), Y( :Delay ) ),
	Chart( Position( 1 ), Points( Box Plots( 1 ) ) ),
	Show Control Panel( 0 ),
	By (:By), //<-- this
);
peterrow
Level II

Re: Standardizing Chart Displays Across the BY role

I had the feeling this must be something simple!  As I say, the local data filter would be nice though it manageable with the global data filter.  I just need to remember to ensure to be clear about what the data is that I am publishing,  I'll also look at scripting - thanks for your help.

statman
Super User

Re: Standardizing Chart Displays Across the BY role

I don't have answers to your questions, but I am curious about this statement:

"So I have a Box plot of the measurement for each of the test machines.  Quite useful for answering the question "Is there a problem with the test machine or the product being tested?"."

I'm a bit confused.  What is being captured within subgroup (and therefore the basis for calculating the standard deviation)?  Is it multiple measures of the SAME product on the same piece of test equipment (which would be indicative of precision repeatability)? Why would the sample size be varying in this case? If I understand correctly, the box plot is just graphically showing what is being assessed by the standard deviation chart.  If the standard deviation is providing quantitative evidence of consistency, then why would you need the box plot?

I'm not sure how you are using these control charts.  

"All models are wrong, some are useful" G.E.P. Box
peterrow
Level II

Re: Standardizing Chart Displays Across the BY role

First of all, I am very happy if anybody suggests any different / better way of achieving a goal, so thanks for the question,  statman.

 

The situation is that there are10 test machines that perform a final control on the products.  The machines measure several parameters.  There are many different product types that are all tested in the same way.  The product types have different materials / constructions so differences in the parameter statistics between products types are to be expected.  However, the parameter statistics should not differ across the machines (meaning that if I could ensure that each machine tested the same amount of each product, I would expect to see the same mean / standard deviation on each machine).

 

But I do not see the same mean of standard deviation across the machines, firstly because the amount of each product tested by each machine is not controlled.  So the question is "is the difference in the statistics between machines for each parameter solely due to differences in the numbers of different products being tested?"  I want to be able to answer this question in a live production environment at any time.

 

Here's my XBar S Chart

 

peterrow_0-1675064122441.png

To answer you question, in the subgroup, I have all data from the specific machine for a specific product over tested over a specific time-period.  In the case above, I would say Machine 17 looks "questionable" on this parameter as it is reading low.  I look for many signals, not just one, so I would now check Machine 17 on several products (first similar products, then products with a different construction),  if I was seeing this pattern in several cases, Machine 17 needs examining further.

 

Another way I thought of doing this was to perform p-Tests automatically, so I would first get my population statistics for a parameter then look at the sample of this population collected by each machine and identify any significant differences.  My problem here was I couldn't work out how to calculate this automatically.

 

Any comments or criticisms of how I am using the statistics are welcome.  I am a willing amateur when it comes to stats.

 

Re: Standardizing Chart Displays Across the BY role

@peterrow, a Local Data Filter can be added at the By-group level using scripting.  Starting with the script provided by @Jed_Campbell, the script below creates a filter that works with all of the by levels. Note that the filter is created from the parent table, so the counts in the filter will reflect all rows, rather than any one of the by subset tables.

 

Names Default To Here( 1 );
//set up data table
dt = Open( "$SAMPLE_DATA/quality control/airport.jmp" );
dt << New Column( "By", formula( Random Integer( 3 ) ) );

//run control chart
New Window( "Control Charts",
	Data Filter Context Box(
		H List Box(
			dt << Data Filter( Local ),
			V List Box(
				dt << Control Chart Builder(
					Variables( Subgroup( :Day ), Y( :Delay ) ),
					Chart( Position( 1 ), Points() ),
					Show Control Panel( 0 ),
					By( :By ),
				)
			)
		)
	)
);