# Calculation STATBEANS®

Gage R&R Calculation STATBEAN Name: GageRandR

Purpose: Estimates gage repeatability and reproducibility by providing Gage R&R tools for Statgraphics software.

DataSource for Gage R&R Calculation: any.

 Name Type Description Possible Values Default Value includeInteraction boolean Whether to include an interaction term (ANOVA method only). true,false true measurementVariableNames String array An array of names for one or more columns containing the measurements. Any string array. null method String Type of method to use for estimation. "Range" or "ANOVA" "Range" operatorVariableName String The name of the column with operator identifiers. Any string. "" partVariableName String The name of the column with part identifiers. Any string. ""

Other Public Methods
 Name Description Arguments Return Value double getGrandMean() Returns the grand mean of all the measurements. None. Mean. double getMeasurementSigma() Returns the estimated sigma for R&R. None. Estimate. int getNumberOfOperators() Returns the number of operators in the study. None. Number. int getNumberOfParts() Returns the number of parts in the study. None. Number. int getNumberOfTrials() Returns the number of trials in the study. None. Number. int getInteractionDegreesOfFreedom() Returns the degrees of freedom for interactions. None. Df. double getInteractionSigma() Returns the estimated sigma for interactions. None. Estimate. double getInteractionSumOfSquares() Returns the sum of squares for interactions. None. Sum of squares. double getMean(int i,int j) Returns the mean for an operator on a part. Operator number, part number (0 origin). Mean. int getOperatorDegreesOfFreedom() Returns the degrees of freedom for operators. None. Df. String getOperatorLabel(int i) Returns an operator label. Operator number (0 origin). Label. double getOperatorMean(int i) Returns the mean for an operator. Operator number (0 origin). Mean. double getOperatorRange(int i) Returns the range for an operator. Operator number (0 origin). Range. double getOperatorSumOfSquares() Returns the sum of squares for operators. None. Sum of squares. int getPartDegreesOfFreedom() Returns the degrees of freedom for parts. None. Df. String getPartLabel(int i) Returns a part label. Part number (0 origin). Label. double getPartSigma() Returns the estimated sigma for part-to-part variability. None. Estimate. double getPartSumOfSquares() Returns the sum of squares for parts. None. Sum of squares. double getRange(int i,int j) Returns the range for an operator on a part. Operator number, part number (0 origin). Range. double getRepeatabilitySigma() Returns the estimated sigma for repeatability. None. Estimate. double getReproducibilitySigma() Returns the estimated sigma for reproducibility. None. Estimate. int getTotalDegreesOfFreedom() Returns the total degrees of freedom. None. Df. double getTotalSigma() Returns the estimated total sigma for the study. None. Estimate. double getTotalSumOfSquares() Returns the total sum of squares. None. Sum of squares. double getUpperLimitRangeChart() Returns the upper limit for a range chart of operator-part ranges. None. Upper limit. double getUpperPredictionLimit(double x,double meansize,double conflevel) Returns the upper prediction limit for a new value of Y. Value of X at which to make prediction, number of observations at X, and the percentage confidence. Upper limit.
Code Sample

//create a datasource bean
FileDataSource fileDataSource1 = new STATBEANS.FileDataSource();

//set the file name to be read
fileDataSource1.setFileName("c:\\statbeans\\samples\\gage.txt");

//set the delimiter character used in the file
fileDataSource1.setDelimiter("tab");

//create a calculation bean
GageRandR gageRandR1 = new STATBEANS.GageRandR();

//set the column names
gageRandR1.setOperatorVariableName("Operator");
gageRandR1.setPartVariableName("Part");
String temp[]=new String;
temp="Measure1";
temp="Measure2";
gageRandR1.setMeasurementVariableNames(temp);

//set the method type
gageRandR1.setMethod("ANOVA");

//create a table bean
GageRandRTable gageTable1 = new STATBEANS.GageRandRTable();
gageTable1.setBackground(Color.yellow);
gageTable1.setBounds(10,30,560,320);

//create a plot bean
GageRandRPlot gagePlot1 = new STATBEANS.GageRandRPlot();
gagePlot1.setBounds(10,350,560,200);

//add the table and plot to the application frame