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
PextII.R
PextII <-
function(x,sizes,phat,length){
b<-matrix(nrow=length,ncol=1); c<-matrix(nrow=length,ncol=1)
for(i in 1:length)
{UCL<-phat+(3*sqrt((phat*(1-phat))/sizes[i]))+(4*(1-2*phat)/(3*sizes[i]))
b[i,]<-UCL
LCL<-phat-(3*sqrt((phat*(1-phat))/sizes[i]))+(4*(1-2*phat)/(3*sizes[i]))
c[i,]<-LCL}
qcc(x,type="p",sizes,limitsc=c(c,b),center=phat,title="P exact phase II")
}

back to top