Help with statistical control(histogram ,cp and cpk )for all columns

Min A Max A Min B Max B Sample Dif A Dif B
0.28 0.4 0.29 0.4 1 0.12 0.11
0.28 0.42 0.3 0.39 2 0.14 0.09
0.26 0.39 0.31 0.4 3 0.13 0.09
0.27 0.41 0.32 0.4 4 0.14 0.08
0.25 0.4 0.3 0.39 5 0.15 0.09
0.27 0.42 0.29 0.38 6 0.15 0.09
0.28 0.4 0.29 0.39 7 0.12 0.1
0.26 0.39 0.31 0.42 8 0.13 0.11
0.28 0.37 0.3 0.4 9 0.09 0.1
0.24 0.36 0.34 0.37 10 0.12 0.03
0.25 0.36 0.33 0.39 11 0.11 0.06
0.27 0.38 0.31 0.4 12 0.11 0.09
0.24 0.39 0.34 0.35 13 0.15 0.01
0.26 0.35 0.34 0.4 14 0.09 0.06
0.28 0.37 0.36 0.39 15 0.09 0.03
0.26 0.37 0.3 0.45 16 0.11 0.15
0.23 0.39 0.35 0.39 17 0.16 0.04
0.29 0.36 0.33 0.44 18 0.07 0.11
0.28 0.37 0.35 0.43 19 0.09 0.08
0.3 0.37 0.31 0.4 20 0.07 0.09
0.29 0.39 0.34 0.41 21 0.1 0.07
0.27 0.39 0.32 0.4 22 0.12 0.08
0.23 0.35 0.32 0.35 23 0.12 0.03
0.24 0.32 0.3 0.34 24 0.08 0.04
0.3 0.48 0.27 0.36 25 0.18 0.09
0.3 0.37 0.28 0.35 26 0.07 0.07
0.29 0.4 0.3 0.38 27 0.11 0.08
0.27 0.41 0.31 0.36 28 0.14 0.05
0.26 0.38 0.31 0.37 29 0.12 0.06
0.28 0.37 0.25 0.33 30 0.09 0.08
0.25 0.34 0.27 0.34 31 0.09 0.07
0.25 0.43 0.28 0.35 32 0.18 0.07
0.3 0.39 0.26 0.39 33 0.09 0.13
0.23 0.42 0.26 0.35 34 0.19 0.09
0.29 0.4 0.29 0.33 35 0.11 0.04
0.21 0.43 0.27 0.32 36 0.22 0.05
0.26 0.38 0.29 0.36 37 0.12 0.07
0.28 0.41 0.26 0.33 38 0.13 0.07
0.31 0.38 0.26 0.37 39 0.07 0.11
0.27 0.39 0.3 0.35 40 0.12 0.05
0.28 0.4 0.28 0.35 41 0.12 0.07
0.3 0.38 0.26 0.35 42 0.08 0.09
0.27 0.43 0.28 0.35 43 0.16 0.07
0.28 0.4 0.27 0.36 44 0.12 0.09
0.33 0.41 0.26 0.34 45 0.08 0.08
0.3 0.41 0.26 0.35 46 0.11 0.09
0.27 0.42 0.28 0.35 47 0.15 0.07
0.3 0.39 0.28 0.34 48 0.09 0.06
0.31 0.42 0.28 0.35 49 0.11 0.07
0.33 0.44 0.27 0.39 50 0.11 0.12
0.26 0.38 0.27 0.36 51 0.12 0.09
0.27 0.38 0.27 0.39 52 0.11 0.12
0.24 0.37 0.25 0.38 53 0.13 0.13
0.34 0.44 0.35 0.42 54 0.1 0.07
0.33 0.43 0.35 0.43 55 0.1 0.08
0.3 0.43 0.3 0.42 56 0.13 0.12
0.3 0.42 0.32 0.43 57 0.12 0.11
0.29 0.42 0.32 0.42 58 0.13 0.1
0.3 0.41 0.29 0.4 59 0.11 0.11
0.29 0.43 0.3 0.42 60 0.14 0.12
0.3 0.4 0.32 0.41 61 0.1 0.09
0.29 0.43 0.31 0.41 62 0.14 0.1
0.31 0.45 0.33 0.4 63 0.14 0.07
0.32 0.42 0.31 0.41 64 0.1 0.1
0.29 0.42 0.31 0.41 65 0.13 0.1
0.3 0.43 0.31 0.42 66 0.13 0.11
0.31 0.37 0.3 0.37 67 0.06 0.07

#mydata are above

library(qcc)
require(qcc)
mydata <- read.csv("d:/temp/ARC.csv", header=TRUE)

head(mydata)

mydata <- read.csv("d:/temp/ARC.csv", header=TRUE)
mydata.one<-with(mydata, qcc.groups(Min.A,
Sample))
mydata.xbar.one <- qcc(mydata.one, type="xbar.one")
summary(mydata.xbar.one)
plot(qcc(data = mydata.one,
type = "xbar.one",
center = mydata.xbar.one$center,
limits = mydata.xbar.one$limits))
mydata.xbar.one<-qcc(mydata.xbar.one, type="xbar.one")
process.capability(mydata.xbar.one, spec.limits=c(0.2,0.5))

I am not sure if this does everything you want. Note at the bottom is an example of getting a summary of the Min_A qcc result.

library(tidyverse)
#> Warning: package 'tibble' was built under R version 4.1.2
library(qcc)
#> Warning: package 'qcc' was built under R version 4.1.2
#> Package 'qcc' version 2.7
#> Type 'citation("qcc")' for citing this R package in publications.
mydata <- read.csv("~/R/Play/Dummy.csv", header=TRUE)
CpFunc <- function(vec){
  qccOut <- qcc(mydata[[vec]], type="xbar.one",title=vec)
  ProcessCap <- process.capability(qccOut, spec.limits=c(0.2,0.5))
  return(list(qcc=qccOut,Process=ProcessCap))
}
Nms <- colnames(mydata)[1:4]
CpList <- map(Nms,CpFunc)

#> 
#> Process Capability Analysis
#> 
#> Call:
#> process.capability(object = qccOut, spec.limits = c(0.2, 0.5))
#> 
#> Number of obs = 67           Target = 0.35
#>        Center = 0.2794          LSL = 0.2
#>        StdDev = 0.02216         USL = 0.5
#> 
#> Capability indices:
#> 
#>        Value    2.5%  97.5%
#> Cp    2.2560  1.8717  2.640
#> Cp_l  1.1942  1.0106  1.378
#> Cp_u  3.3178  2.8381  3.797
#> Cp_k  1.1942  0.9754  1.413
#> Cpm   0.6757  0.5182  0.833
#> 
#> Exp<LSL 0.017%    Obs<LSL 0%
#> Exp>USL 0%    Obs>USL 0%

#> 
#> Process Capability Analysis
#> 
#> Call:
#> process.capability(object = qccOut, spec.limits = c(0.2, 0.5))
#> 
#> Number of obs = 67           Target = 0.35
#>        Center = 0.3975          LSL = 0.2
#>        StdDev = 0.0227          USL = 0.5
#> 
#> Capability indices:
#> 
#>        Value    2.5%  97.5%
#> Cp    2.2026  1.8274  2.577
#> Cp_l  2.8995  2.4791  3.320
#> Cp_u  1.5057  1.2799  1.731
#> Cp_k  1.5057  1.2367  1.775
#> Cpm   0.9504  0.7344  1.166
#> 
#> Exp<LSL 0%    Obs<LSL 0%
#> Exp>USL 0%    Obs>USL 0%

#> 
#> Process Capability Analysis
#> 
#> Call:
#> process.capability(object = qccOut, spec.limits = c(0.2, 0.5))
#> 
#> Number of obs = 67           Target = 0.35
#>        Center = 0.2991          LSL = 0.2
#>        StdDev = 0.01625         USL = 0.5
#> 
#> Capability indices:
#> 
#>        Value    2.5%  97.5%
#> Cp    3.0764  2.5524  3.599
#> Cp_l  2.0325  1.7339  2.331
#> Cp_u  4.1202  3.5265  4.714
#> Cp_k  2.0325  1.6767  2.388
#> Cpm   0.9358  0.7178  1.153
#> 
#> Exp<LSL 0%    Obs<LSL 0%
#> Exp>USL 0%    Obs>USL 0%

#> 
#> Process Capability Analysis
#> 
#> Call:
#> process.capability(object = qccOut, spec.limits = c(0.2, 0.5))
#> 
#> Number of obs = 67           Target = 0.35
#>        Center = 0.3813          LSL = 0.2
#>        StdDev = 0.01786         USL = 0.5
#> 
#> Capability indices:
#> 
#>       Value   2.5%  97.5%
#> Cp    2.799  2.322  3.275
#> Cp_l  3.384  2.895  3.873
#> Cp_u  2.214  1.890  2.538
#> Cp_k  2.214  1.828  2.600
#> Cpm   1.386  1.076  1.695
#> 
#> Exp<LSL 0%    Obs<LSL 0%
#> Exp>USL 0%    Obs>USL 0%

names(CpList) <- Nms
summary(CpList$Min_A$qcc)
#>
#> Call:
#> qcc(data = mydata[[vec]], type = "xbar.one", title = vec)
#>
#> xbar.one chart for mydata[[vec]]
#>
#> Summary of group statistics:
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 0.210000 0.260000 0.280000 0.279403 0.300000 0.340000
#>
#> Group sample size: 1
#> Number of groups: 67
#> Center of group statistics: 0.279403
#> Standard deviation: 0.02216312
#>
#> Control limits:
#> LCL UCL
#> 0.2129136 0.3458923

Created on 2022-02-28 by the reprex package (v2.0.1)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.