cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
ninanoc
Level I

Create control chart without missing row

Hi, 

 

I would like to create several control charts from a data set that I have. I made an example so far that includes all information, categorize it and create a new table based on the function I've applied. 

 

From there, I need to create a control chart but without the empty cells. 

 

I've made an example data set of what I've done so far, but I still can't figure out how to create a control chart as needed. 

So based on the example data set, I would want to have a control chart for Test 1 without ID5, Test 2 without ID12 and 4 and so on. 

 

Local data filter won't work since I have more than 100 of ID no. in the real data and would like to have this done automatically. 

 

Thank you for your help.

2 REPLIES 2
ninanoc
Level I

Re: Create control chart without missing row

I have semi-figured out the solution, but facing another problem. 

 

I can eliminate cells by applying "where"

 

Variables(

        subgroup( :ID),

        Y( test1)

),

Where (

Test1>= 0

)

 

However, why doesn't it work with the below function?

Variables(

        subgroup( :ID),

        Y( test1,

             test2

           )

),

Where (

Test1>= 0,

Test2>=0

)

 

 

Georg
Level VII

Re: Create control chart without missing row

Hi,

1st: To delete the missing you should select the appropriate col, in your case result_2

data << Select Where( Is Missing( :result_2 ) ) << Delete Rows;

2nd: you could do the multiple Control Charts by means of JMP base functionality, e.g. "by group" or "local data filter", see the examples "Xbar by" and "Xbar Local DF" in the full script generating table and scripts.

BR

 

New Table( "test_controlchart",
	Add Rows( 19 ),
	Compress File When Saved( 1 ),
	New Script(
		"control chart",
		data = Current Data Table();
		data << Select Where( Is Missing( :test ) ) << Delete Rows;
		data << deSelect;
		data << Split(
			Split By( :test ),
			Split( :result_2 ),
			Group( :ID ),
			Remaining Columns( Drop All )
		);
	),
	New Script(
		"delete missing",
		data = Current Data Table();
		data << Select Where( Is Missing( :result_2 ) ) << Delete Rows;
		data << deSelect;
	),
	New Script(
		"XBar By",
		Control Chart Builder(
			by( :test ),
			Size( 528, 454 ),
			Show Control Panel( 0 ),
			Show Capability( 0 ),
			Variables( Subgroup( :ID ), Y( :result_2 ) )
		)
	),
	New Script(
		"XBar Local DF",
		Control Chart Builder(
			Size( 528, 454 ),
			Show Control Panel( 0 ),
			Show Capability( 0 ),
			Variables( Subgroup( :ID ), Y( :result_2 ) ),
			Local Data Filter(
				Conditional,
				Add Filter( columns( :test ), Where( :test == "Test1" ) )
			)
		)
	),
	New Column( "ID",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 2, 3, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5] ),
		Set Display Width( 48 )
	),
	New Column( "result_2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [2, 4, 2, 5, ., 5, 1, 4, ., ., ., 8, ., 2, 1, ., ., 6, 3] ),
		Set Display Width( 58 )
	),
	New Column( "method",
		Character( 2 ),
		"Nominal",
		Set Values(
			{"M1", "M2", "M3", "M2", "M3", "M1", "M2", "M3", "M1", "M2", "M3", "M1",
			"M2", "M3", "M1", "M2", "M3", "M1", "M2"}
		),
		Set Display Width( 51 )
	),
	New Column( "test",
		Character( 5 ),
		"Nominal",
		Formula(
			If(
				:method == "M1", "Test1",
				:method == "M2", "Test2",
				:method == "M3", "Test3",
				""
			)
		),
		Set Display Width( 49 )
	)
)
Georg