Análisis Gage R&R para datos continuos (MINITAB)
Codigo 1.
voltmeter = factor(rep(1:2, each = 9))
battery = factor(rep(rep(1:3, each = 3), 2))
run = factor(rep(1:3, 6))
voltage = c(1.4727, 1.4206, 1.4754, 1.5083, 1.5739, 1.4341, 1.5517, 1.5483, 1.4614,
1.3337,1.6078, 1.4767, 1.4066, 1.5951, 1.8419,1.7087, 1.8259, 1.5444)
batteries = data.frame(voltmeter, battery,run, voltage)
ggplot(batteries,aes(voltmeter,voltage))+geom_boxplot(aes(colour=battery))
library(SixSigma)
#ss.rr(var, part, appr, data, main, sub)
my.rr <- ss.rr(var = voltage, part = battery,
appr = voltmeter,
data = batteries,
main = "Six Sigma Gage R&R Measure",
sub = "Batteries Project MSA")
## Complete model (with interaction):
##
## Df Sum Sq Mean Sq F value Pr(>F)
## battery 2 0.06308 0.03154 3.415 0.227
## voltmeter 1 0.04444 0.04444 4.812 0.160
## battery:voltmeter 2 0.01847 0.00924 0.584 0.573
## Repeatability 12 0.18982 0.01582
## Total 17 0.31582
##
## alpha for removing interaction: 0.05
##
##
## Reduced model (without interaction):
##
## Df Sum Sq Mean Sq F value Pr(>F)
## battery 2 0.06308 0.03154 2.120 0.157
## voltmeter 1 0.04444 0.04444 2.987 0.106
## Repeatability 14 0.20829 0.01488
## Total 17 0.31582
##
## Gage R&R
##
## VarComp %Contrib
## Total Gage R&R 0.018162959 86.74
## Repeatability 0.014878111 71.05
## Reproducibility 0.003284848 15.69
## voltmeter 0.003284848 15.69
## Part-To-Part 0.002777127 13.26
## Total Variation 0.020940086 100.00
##
## StdDev StudyVar %StudyVar
## Total Gage R&R 0.13477002 0.8086201 93.13
## Repeatability 0.12197586 0.7318552 84.29
## Reproducibility 0.05731359 0.3438816 39.61
## voltmeter 0.05731359 0.3438816 39.61
## Part-To-Part 0.05269846 0.3161907 36.42
## Total Variation 0.14470690 0.8682414 100.00
##
## Number of Distinct Categories = 1
Codigo 2.
load("globos.RData")
library(SixSigma)
my.rr <- ss.rr(var = perimetro, part = color, appr = persona,data = glob,
main = "Six Sigma Gage R&R Measure", sub = "Globos")
## Complete model (with interaction):
##
## Df Sum Sq Mean Sq F value Pr(>F)
## color 7 13191 1884.4 460.002 < 2e-16
## persona 4 2 0.4 0.109 0.978
## color:persona 28 115 4.1 4.868 1.34e-08
## Repeatability 80 67 0.8
## Total 119 13375
##
## alpha for removing interaction: 0.05
##
## Gage R&R
##
## VarComp %Contrib
## Total Gage R&R 1.9264787 1.51
## Repeatability 0.8414687 0.66
## Reproducibility 1.0850100 0.85
## persona 0.0000000 0.00
## color:persona 1.0850100 0.85
## Part-To-Part 125.3533112 98.49
## Total Variation 127.2797899 100.00
##
## StdDev StudyVar %StudyVar
## Total Gage R&R 1.387976 8.327859 12.30
## Repeatability 0.917316 5.503896 8.13
## Reproducibility 1.041638 6.249829 9.23
## persona 0.000000 0.000000 0.00
## color:persona 1.041638 6.249829 9.23
## Part-To-Part 11.196129 67.176776 99.24
## Total Variation 11.281835 67.691007 100.00
##
## Number of Distinct Categories = 11
Codigo 3. qualityTools
library(qualityTools)
# Generamos un conjunto de datos en el que van a intervenir 3 operadores que medirán 10 elementos
distintos, y 2 veces cada uno de ellos:
temp = gageRRDesign(Operators=3,Parts=10,Measurements=2, randomize = FALSE)
# Especificamos la variable respuesta (mediciones) y la asignamos dentro del diseño
y = c(23,22,22,22,22,25,23,22,23,22,20,22,22,22,24,25,27,28,23,24,23,24,24,22,
22,22,24,23,22,24,20,20,25,24,22,24,21,20,21,22,21,22,21,21,24,27,25,27,
23,22,25,23,23,22,22,23,25,21,24,23)
response(temp) = y
# Si queremos utilizar los datos generados como un data.frame cualquiera, habremos de convertirlo:
temp.f=as.data.frame(temp)
# Graficamos los datos para ver diferencias entre operadores y entre elementos:
ggplot(temp.f,aes(Part,Measurement))+geom_boxplot(aes(colour=Operator))
gdo = gageRR(temp)
##
## AnOVa Table - crossed Design
## Df Sum Sq Mean Sq F value Pr(>F)
## Operator 2 20.63 10.317 8.597 0.00112
## Part 9 107.07 11.896 9.914 7.31e-07
## Operator:Part 18 22.03 1.224 1.020 0.46732
## Residuals 30 36.00 1.200
##
## ----------
## AnOVa Table Without Interaction - crossed Design
## Df Sum Sq Mean Sq F value Pr(>F)
## Operator 2 20.63 10.317 8.533 0.000675
## Part 9 107.07 11.896 9.840 2.39e-08
## Residuals 48 58.03 1.209
##
## ----------
##
## Gage R&R
## VarComp VarCompContrib Stdev StudyVar StudyVarContrib
## totalRR 1.664 0.483 1.290 7.74 0.695
## repeatability 1.209 0.351 1.100 6.60 0.592
## reproducibility 0.455 0.132 0.675 4.05 0.364
## Operator 0.455 0.132 0.675 4.05 0.364
## Operator:Part 0.000 0.000 0.000 0.00 0.000
## Part to Part 1.781 0.517 1.335 8.01 0.719
## totalVar 3.446 1.000 1.856 11.14 1.000
##
## ---
## * Contrib equals Contribution in %
## **Number of Distinct Categories (truncated signal-to-noise-ratio) = 1
#que nos proporciona por un lado la descripción cuantitativa
summary(gdo)
##
## Operators: 3 Parts: 10
## Measurements: 2 Total: 60
## ----------
##
## AnOVa Table - crossed Design
## Df Sum Sq Mean Sq F value Pr(>F)
## Operator 2 20.63 10.317 8.597 0.00112
## Part 9 107.07 11.896 9.914 7.31e-07
## Operator:Part 18 22.03 1.224 1.020 0.46732
## Residuals 30 36.00 1.200
##
## ----------
## AnOVa Table Without Interaction - crossed Design
## Df Sum Sq Mean Sq F value Pr(>F)
## Operator 2 20.63 10.317 8.533 0.000675
## Part 9 107.07 11.896 9.840 2.39e-08
## Residuals 48 58.03 1.209
##
## ----------
##
## Gage R&R
## VarComp VarCompContrib Stdev StudyVar StudyVarContrib
## totalRR 1.664 0.483 1.290 7.74 0.695
## repeatability 1.209 0.351 1.100 6.60 0.592
## reproducibility 0.455 0.132 0.675 4.05 0.364
## Operator 0.455 0.132 0.675 4.05 0.364
## Operator:Part 0.000 0.000 0.000 0.00 0.000
## Part to Part 1.781 0.517 1.335 8.01 0.719
## totalVar 3.446 1.000 1.856 11.14 1.000
##
## ---
## * Contrib equals Contribution in %
## **Number of Distinct Categories (truncated signal-to-noise-ratio) = 1
plot(gdo)
Codigo 4. Análisis Gage R&R para datos cualitativos
load("lacasitos.RData")
# part= identificador del lacasito (de 1 a 20)
# patt=patrón o clasificación correcta (1=ok, 0=defectuoso)
# appr=observador/inspector (1 y 2)
# rev=revisión que realiza cada observador (1 y 2)
# result=clasificación del observador (1=ok, 0=defectuoso)
# Y cargamos una función propia para resolver el análisis de un sistema de medida binario
source("gagerr-binario.R")
gage.rr.binary(part,appr,patt,rev,result,lacasitos)
## $Repetitivity
## inspected matched.rev Repetitivity Repet.IC95.1 Repet.IC95.2
## Inspector1 20 10 50 % 29.93 % 70.07 %
## Inspector2 20 19 95 % 73.06 % 99.74 %
##
## $Repetitivity.Exact
## inspected matched.patt Repetitivity.Exact Repet.Exact.IC95.1
## Inspector1 20 8 40 % 19.98 %
## Inspector2 20 11 55 % 32.05 %
## Repet.Exact.IC95.2
## Inspector1 63.59 %
## Inspector2 76.17 %
##
## $Reproducibility
## inspected matched.rev Reproducibility Reprod.IC95.l Reprod.IC95.u
## Results 40 29 72.5 % 55.86 % 84.86 %
##
## $Reproducibility.Exact
## inspected matched.patt Reproducibility.Exact Reprod.Exact.IC95.l
## Results 40 22 55 % 38.66 %
## Reprod.Exact.IC95.u
## Results 70.4 %