https://github.com/cran/IQCC
Raw File
Tip revision: 015c96430f6bddf3c9b4b20d878ceae380a023be authored by Emanuel P. Barbosa on 21 September 2009, 00:00:00 UTC
version 1.0
Tip revision: 015c964
PchartI.R
PchartI <-
function(x,sizes,par,length){
phat<-mean(par)
s<-matrix(nrow=length,ncol=1); d<-matrix(nrow=length,ncol=1)
for(i in 1:length)
{UCL<-phat+(3*sqrt((phat*(1-phat))/sizes[i]))
s[i,]<-UCL
LCL<-phat-(3*sqrt((phat*(1-phat))/sizes[i]))
d[i,]<-LCL}
qcc(x,type="p",sizes,limits=c(d,s),center=phat,title="P chart phase I")
return(phat)
}

back to top