“…The InvertCDF.fn < -function(X,cdfX,pctpts = c(.9,.95)) { nq < -length(pctpts) y < -abs(outer(cdfX,pctpts,"-")) z < -apply(y,2,min) w < -X%*%(y==t(array(z,c(nq,length(X))))) return(w) } NTNC < -rbind(NTNC) TotN < -apply(NTNC,1,sum) K < -dim(NTNC) [1] nq < -length(pctpts) result < -array(0,c(K,nq + 2)) sumry < -vector("list",K) xlimL < -qnbinom(eps,abcd [1],abcd [ ), break, s < -s + 1) } cfS < -sum(fS) fS < -fS/cfS sfs < -as.data.frame(cbind(S,fS,cumsum(fS))) dimnames(sfs)[ [2]] < -c("S","denS","cdfS") quants < -InvertCDF.fn(sfs$S,sfs$cdfS,pctpts = pctpts) meanS < -round(S%*%fS,1) sumry[[i]] < -list(meanS = meanS,SfS = sfs,quants = quants)…”