Computation of a 1-alpha FAB t-interval using z-optimal spending function

fabtzCI(y, s, dof, alpha = 0.05, psi = list(mu = 0, tau2 = 1e+05, sigma2 = 1))

## Arguments

y a numeric scalar, a normally distributed statistic a numeric scalar, the standard error of y positive integer, degrees of freedom for s the type I error rate, so 1-alpha is the coverage rate a list of parameters for the spending function, including mu, the prior expectation of E[y] tau2, the prior variance of E[y] sigma2 the variance of y

## Value

a two-dimensional vector of the left and right endpoints of the interval

Peter Hoff

## Examples

n<-10
y<-rnorm(n)
fabtzCI(mean(y),sqrt(var(y)/n),n-1)
#> [1] -1.2408834  0.3581589t.test(y)\$conf.int
#> [1] -1.2408908  0.3581618
#> attr(,"conf.level")
#> [1] 0.95