R/CP.stats.SM.R

Defines functions CP.stats.SM

Documented in CP.stats.SM

#' @export

CP.stats.SM <-
function(obj,alpha=0.05,type="upper"){
    #  Calculates all possible upper limits for p from an object
    #  that contains all possible data sets from a group sequential trial.
    lims=NULL
    for(h in 1:length(obj$S)){
        if(type=="upper"){lims=c(lims,CP.upper(obj$S[h],sum(obj$design[,1][1:obj$M[h]]),a=alpha))}
        if(type=="lower"){lims=c(lims,CP.lower(obj$S[h],sum(obj$design[,1][1:obj$M[h]]),a=alpha))}
    }
    out=obj
    out$lims=signif(lims,6)
    out
}

Try the CLAST package in your browser

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

CLAST documentation built on April 8, 2022, 9:06 a.m.