Get the boundaries required for a particular alpha-spending function and an observed information rate out of a total sample size.

get.boundaries.aspend(
  a.func,
  rates,
  u_k = NULL,
  rho = 1,
  change = 0,
  algorithm = Miwa(steps = 1000)
)

Arguments

a.func

A continuous, monotonic increasing function of t where a.func(0) = 0 and a.func(1) = a where a is the type I error desired

rates

A vector of information rates (between 0 and 1)

u_k

An optional matrix of previous boundaries

rho

Fraction of variance explained by fitting ANCOVA.

change

A vector indicating which stages use ANOVA v. ANCOVA.

Details

Your data generator in this case needs to be the data generation under the null hypothesis in order for this function to work correctly with alpha-spending.

Examples

# Information rates
t <- 1:4/4

# Approximate Pocock boundaries, with R^2 = 0.5, ANCOVA at last stage
get.boundaries.aspend(a.func=pocock.spend(0.05), rates=t)
#>           [,1]     [,2]
#> [1,] -2.368328 2.368328
#> [2,] -2.367524 2.367524
#> [3,] -2.358168 2.358168
#> [4,] -2.350030 2.350030
get.boundaries.aspend(a.func=pocock.spend(0.05), rates=t,
                      rho=sqrt(0.5), change=c(0, 0, 0, 1))
#>           [,1]     [,2]
#> [1,] -2.368328 2.368328
#> [2,] -2.367524 2.367524
#> [3,] -2.358168 2.358168
#> [4,] -2.512984 2.512984