function(k, n0, pstar)
{
# function to compute comparison with a standard critical values
# for case D (mu0 unknown, CRN, no known structure) using the
# tighter Bonferroni approximation
#
# k = number of systems, excluding standard
# n0 = first-stage sample size
# pstar = overall desired confidence level
#
# last update 4/23/97
#
alpha <- 1 - pstar
check <- function(x, k, n0, alpha, h)
{
abs(((1 - pt(x - h, n0 - 1)) + (k - 1) * (1 - pt(x, n0 - 1))) -
alpha)
}
h <- qt(1 - alpha/k, n0 - 1)
result <- optimize(check, interval = c(h, 2 * h), keep.xy = F, k = k,
n0 = n0, alpha = alpha, h = h)
g <- result$minimum
hg <- matrix(c(h, g), ncol = 1)
hg
}