
Create an object of class 'lab.qcs' to perform statistical quality control. This function is used to compute statistics required for plotting Statitics
Source:R/lab.qcs.R
lab.qcs.Rd
It develops an object of lab.qcs
-codelinkclass to perform statistical quality control.
This function is used to compute the requested statistics to be summarized and ploted.
Arguments
- x
An object of class
lab.qcs
for which a print is desired.- ...
Other arguments passed to or from methods.
- object
An object of class
lab.qcs
for which a summary is desired.
Examples
library(ILS)
data(Glucose)
Glucose.qcdata <- lab.qcdata(Glucose)
str(Glucose.qcdata)
#> Classes ‘lab.qcdata’ and 'data.frame': 120 obs. of 4 variables:
#> $ x : num 41 41.5 41.4 41.2 42 ...
#> $ replicate : Factor w/ 3 levels "1","2","3": 1 2 3 1 2 3 1 2 3 1 ...
#> $ material : Factor w/ 5 levels "A","B","C","D",..: 1 1 1 1 1 1 1 1 1 1 ...
#> $ laboratory: Factor w/ 8 levels "Lab1","Lab2",..: 1 1 1 2 2 2 3 3 3 4 ...
#> - attr(*, "data.name")= chr "Glucose"
Glucose.qcs <- lab.qcs(Glucose.qcdata)
str(Glucose.qcs)
#> List of 6
#> $ lab.qcdata :Classes ‘lab.qcdata’ and 'data.frame': 120 obs. of 4 variables:
#> ..$ x : num [1:120] 41 41.5 41.4 41.2 42 ...
#> ..$ replicate : Factor w/ 3 levels "1","2","3": 1 2 3 1 2 3 1 2 3 1 ...
#> ..$ material : Factor w/ 5 levels "A","B","C","D",..: 1 1 1 1 1 1 1 1 1 1 ...
#> ..$ laboratory: Factor w/ 8 levels "Lab1","Lab2",..: 1 1 1 2 2 2 3 3 3 4 ...
#> ..- attr(*, "data.name")= chr "Glucose"
#> $ statistics.Laboratory:'data.frame': 40 obs. of 4 variables:
#> ..$ laboratory: Factor w/ 8 levels "Lab1","Lab2",..: 1 1 1 1 1 2 2 2 2 2 ...
#> ..$ material : Factor w/ 5 levels "A","B","C","D",..: 1 2 3 4 5 1 2 3 4 5 ...
#> ..$ mean.i : num [1:40] 41.3 78.3 133.2 193.7 293.3 ...
#> ..$ s.i : num [1:40] 0.223 0.158 0.591 0.06 0.727 ...
#> $ statistics.material :'data.frame': 5 obs. of 5 variables:
#> ..$ mean: num [1:5(1d)] 41.5 79.6 135.1 194.7 294.5
#> ..$ S : num [1:5(1d)] 0.554 0.866 1.907 1.426 2.807
#> ..$ S_r : num [1:5(1d)] 1.06 1.5 2.75 2.63 3.93
#> ..$ S_B : num [1:5(1d)] 0.606 0.863 2.657 2.595 2.693
#> ..$ S_R : num [1:5(1d)] 1.06 1.5 3.48 3.37 4.19
#> $ p : int 8
#> $ n : int 3
#> $ m : int 5
#> - attr(*, "class")= chr "lab.qcs"
#> - attr(*, "object.name")= chr "Glucose"
#> - attr(*, "type.data")= chr "lab.qcs"
summary(Glucose.qcs)
#>
#> Number of laboratories: 8
#> Number of materials: 5
#> Number of replicate: 3
#> Summary for Laboratory (means):
#> Lab1 Lab2 Lab3 Lab4 Lab5 Lab6 Lab7
#> A 41.28333 41.44000 41.45000 41.45667 41.46333 42.02000 40.45667
#> B 78.31667 79.23333 79.90333 80.96333 78.69000 79.89333 79.51667
#> C 133.19667 135.40667 134.59000 140.83000 133.26667 136.61667 132.49333
#> D 193.65000 195.10667 192.09000 197.21333 193.05000 197.24333 191.26000
#> E 293.25333 298.91667 292.67000 295.82000 293.56333 294.95667 290.13667
#> Lab8
#> A 42.57667
#> B 80.34667
#> C 134.71000
#> D 198.12333
#> E 296.62000
#>
#> Summary for Laboratory (Deviations):
#> Lab1 Lab2 Lab3 Lab4 Lab5 Lab6 Lab7 Lab8
#> A 0.2230097 0.4850773 1.0608016 1.8117763 0.3666515 1.408119 1.247811 0.8224557
#> B 0.1582193 1.3268509 0.8303212 2.7660863 0.7754354 1.636592 2.059935 0.5064912
#> C 0.5909597 2.1679791 1.7287857 6.6200227 1.1987215 1.287025 2.124296 1.0343597
#> D 0.0600000 4.6824068 1.5932043 1.9365519 1.8826311 1.649616 3.817709 2.4637844
#> E 0.7266590 9.1869055 2.7101107 0.8835723 0.9543759 4.034282 3.304184 1.6479078
#>
#> Summary for Material:
#> mean S S_r S_B S_R
#> A 41.51833 0.5543251 1.063224 0.6061274 1.058783
#> B 79.60792 0.8664835 1.496071 0.8627346 1.495481
#> C 135.13875 1.9071053 2.750879 2.6566872 3.478919
#> D 194.71708 1.4262962 2.625065 2.5950046 3.365713
#> E 294.49208 2.8067799 3.934974 2.6931364 4.192334