Subscribe Bookmark RSS Feed

Process Screening Platform

Phil_Brown

Super User

Joined:

Mar 20, 2012

When I have several columns that have user defined control limits (as a Column Property), and I runProcess Screening, the resulting table doesn't show the limits. All the tests and related alarms are nicely displayed, but it would be also nice to see the limits. Is there a way to show them?

PDB
1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp

Staff

Joined:

Jun 23, 2011

Solution

You can always do this kind of thing:

NamesDefaultToHere(1);

// Make a table
dt = New Table( "Test",
			New Column( "Column 1",
				Numeric,
				"Continuous",
				Formula( Random Normal() ),
				Set Property(
					"Control Limits",
					{Individual Measurement( Avg( 1 ), LCL( 0 ), UCL( 2 ) )}
				)
			),
			New Column( "Column 2",
				Numeric,
				"Continuous",
				Formula( Random Normal( 3 ) ),
				Set Property( "Control Limits", {XBar( Avg( 3 ), LCL( 0 ), UCL( 6 ) )} )
			)
		);
dt << addRows(1000);

// Do the Process Screening
ps = dt << Process Screening( Y( :Column 1, :Column 2 ), Control Chart Type( "Indiv and MR" ) );

// Add the limits
tb = Report(ps)[TableBox(1)];
cols = Report(ps)[StringColBox(1)] << get;
avg_ = J(NItems(cols), 1, .);
lcl_ = J(NItems(cols), 1, .);
ucl_ = J(NItems(cols), 1, .);
for (c=1, c<=NItems(cols), c++,
	clExpr = Column(dt, cols[c]) << getProperty("Control Limits");
	avg_[c] = Arg(Arg(Arg(clExpr,1), 1), 1);
	lcl_[c] = Arg(Arg(Arg(clExpr,1), 2), 1);
	ucl_[c] = Arg(Arg(Arg(clExpr,1), 3), 1);
);
tb << Append(
			ColSpanBox("Control Limits",
				NumberColBox("Average", avg_),
				NumberColBox("LCL", lcl_),
				NumberColBox("UCL", ucl_),
				)
			);

But I suspect you knew that already!

2 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

Solution

You can always do this kind of thing:

NamesDefaultToHere(1);

// Make a table
dt = New Table( "Test",
			New Column( "Column 1",
				Numeric,
				"Continuous",
				Formula( Random Normal() ),
				Set Property(
					"Control Limits",
					{Individual Measurement( Avg( 1 ), LCL( 0 ), UCL( 2 ) )}
				)
			),
			New Column( "Column 2",
				Numeric,
				"Continuous",
				Formula( Random Normal( 3 ) ),
				Set Property( "Control Limits", {XBar( Avg( 3 ), LCL( 0 ), UCL( 6 ) )} )
			)
		);
dt << addRows(1000);

// Do the Process Screening
ps = dt << Process Screening( Y( :Column 1, :Column 2 ), Control Chart Type( "Indiv and MR" ) );

// Add the limits
tb = Report(ps)[TableBox(1)];
cols = Report(ps)[StringColBox(1)] << get;
avg_ = J(NItems(cols), 1, .);
lcl_ = J(NItems(cols), 1, .);
ucl_ = J(NItems(cols), 1, .);
for (c=1, c<=NItems(cols), c++,
	clExpr = Column(dt, cols[c]) << getProperty("Control Limits");
	avg_[c] = Arg(Arg(Arg(clExpr,1), 1), 1);
	lcl_[c] = Arg(Arg(Arg(clExpr,1), 2), 1);
	ucl_[c] = Arg(Arg(Arg(clExpr,1), 3), 1);
);
tb << Append(
			ColSpanBox("Control Limits",
				NumberColBox("Average", avg_),
				NumberColBox("LCL", lcl_),
				NumberColBox("UCL", ucl_),
				)
			);

But I suspect you knew that already!

Phil_Brown

Super User

Joined:

Mar 20, 2012

Thanks Ian! I was hoping there was a platform message or something that could be toggled on/off. At any rate, this will work!
PDB