betaspend: Function that calculates the lower boundaries for futility

View source: R/sequential_design_classV2.5.R

betaspendR Documentation

Function that calculates the lower boundaries for futility

Description

Calculates the lower boundaries for futility at each look

Usage

betaspend(levels, upperboundary, t, int = rep(500, length(t)), noncent, tol = 0.005)

Arguments

levels

The cumulative beta spending at each look time

upperboundary

The upper efficacy boundaries at each look

t

Normalized look times

int

The numbers of intervals the solution space is partitioned into

noncent

The noncentrality parameter

tol

Tolerance of the solution using uniroot

Value

numeric

Examples


f<- function(t) 0.025*t^4
g<- function(t) 0.15*t^3
t<-c(0.33,0.67,1)
cum_alphas<-f(t)
cum_betas<-g(t)
noncent<-qnorm(0.975)+qnorm(0.85)
upper_boundaries<-alphaspend(cum_alphas,t,int=rep(500, length(t)),tol=0.005)
lower_boundaries<-betaspend(cum_betas, upper_boundaries, t, int = rep(500,3), noncent, tol = 0.005) 

seqmon documentation built on May 29, 2024, 9:14 a.m.