Compute grid points for first interim analysis in a group sequential design
Arguments
- r
 Integer, at least 2; default of 18 recommended by Jennison and Turnbull
- theta
 Drift parameter for first analysis
- I
 Information at first analysis
- a
 lower limit of integration (scalar)
- b
 upper limit of integration (scalar
> a)
Value
A tibble with grid points in z, numerical integration weights in w,
and a normal density with mean mu = theta * sqrt{I} and variance 1 times the weight in w.
Examples
library(dplyr)
# Replicate variance of 1, mean of 35
gsdmvn:::h1_(theta = 5, I = 49) %>% summarise(mu = sum(z * h), var = sum((z - mu)^2 * h))
#> # A tibble: 1 × 2
#>      mu   var
#>   <dbl> <dbl>
#> 1  35.0  1.00
# Replicate p-value of .0001 by numerical integration of tail
gsdmvn:::h1_(a = qnorm(.9999)) %>% summarise(p = sum(h))
#> # A tibble: 1 × 1
#>          p
#>      <dbl>
#> 1 0.000100