## Scripting a Gauge R&R Study

Community Trekker

Joined:

Apr 12, 2012

JMP 9

I would like to script a Gauge R&R study involving multiple variables, instead of using the red triangle dropdown menus multiple times from the Chart->Variabliity/Gauge Chart platform.

If you perform the analysis manually, and select from the red triangle dropdown menu item Gauge Studies/Gauge RR, you get two dialog boxes, one which asks if the design is crossed or nested (mine is crossed), and a second dialog box which asks for the Gauge R&R specifications.

When I create a script to perform this task over all Y variables, the first dialog box doesn't appear, but I cannot figure out how to get the 2nd dialog box to not appear, it always appears no matter what I do. If you know how to change the script so that the 2nd dialog box no longer appears, please let me know.

Here is my script:

rezults = Column Dialog(
title( "Select Columns For Gauge R&R Analysis" ),
yycol = ColList( "Y, Response",  Mincol( 1 ), DataType( Numeric ) ),
xxcol = ColList( "X, Factor",  Mincol( 1 ), Modeling Type( Nominal ) ),
bbycol = ColList( "By"  ));

ylist = rezults["yycol"];
xlist = rezults["xxcol"];
bbylist = rezults["bbycol"];

Variability Chart(
Y( eval(ylist) ),
X( eval(xlist) ),
By ( eval(bbylist) ),
Model( "Crossed" ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
Historical Mean( 0 ),
Historical Sigma( 1 ),
Process Variation( 0 ),
Std Dev Chart( 0 ),
Gauge RR( 6, 0, 0, 0 ),
Gauge RR Report( 1 )
);

Super User

Joined:

Jun 23, 2011

Something like the following might be helpful. I pulled up the sample dataset "2 factors crossed" and added a column I called MyY with formula random normal mean 0 var 1. The code below stacks the output in one window for all Y columns selected. If you omit the New Window wrapper each Y column would have its own window. The assumption is that each allowable column has values entered for the "Spec Limits" property.

nw = new window("Test Window",

rezults = Column Dialog(

title( "Select Columns For Gauge R&R Analysis" ),

yycol = ColList( "Y, Response",  Mincol( 1 ), DataType( Numeric ) ),

xxcol = ColList( "X, Factor",  Mincol( 1 ), Modeling Type( Nominal ) ),

bbycol = ColList( "By"  ));

ylist = rezults["yycol"];

xlist = rezults["xxcol"];

bbylist = rezults["bbycol"];

N = NItems(ylist);

//show(ylist,xlist,bbylist);

//show(ylist[1],xlist[1]);

for(i=1,i<=N,i++,

specs = ylist << get property("Spec Limits");

usl = specs["USL"];

lsl = specs["LSL"];

//show(specs);

//show(usl);

//show(lsl);

//)

vc = Variability Chart(

Y( ylist),

X( :Operator, :part# ),

Model( "Crossed" ),

Max Iter( 100 ),

Conv Limit( 0.00000001 ),

Number Integration Abscissas( 128 ),

Number Function Evals( 65536 ),

Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),

Historical Sigma( 0 ),

Std Dev Chart( 1 ),

Gauge RR( 6, usl-lsl, lsl, usl ),

Gauge RR Report( 1 )

);

)

)