R/pFstop_vec_general.R

Defines functions pFstop_vec_general

pFstop_vec_general=function(n, p, p0, p1, vn.int, cFvec, shape1=1,shape2=1, type=5, alpha=0.05,printit=FALSE){

  out=lapply(cFvec, function(cF) {
    v.crit <-crit_general(n=n, p0=p0, p1=p1, vn.int=vn.int, alpha=alpha, crit=cF, type=type, shape1 = shape1, shape2 = shape2)
    res=    pFstop(p,c(vn.int,n),v.crit)
    res
  }
  )
  names(out)=cFvec

  summ=sapply(out, function(x) x$P.stop.cum)
  rownames(summ)= paste0("Pat.",c(vn.int,n))
  if (printit==TRUE) print(summ)
  res=list(summary=summ, all=out)
  invisible(res)
}

Try the BDP2 package in your browser

Any scripts or data that you put into this service are public.

BDP2 documentation built on May 1, 2019, 9:03 p.m.