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