h1_: Initialize numerical integration for group sequential design

View source: R/h1_.r

h1_R Documentation

Initialize numerical integration for group sequential design

Description

Compute grid points for first interim analysis in a group sequential design

Usage

h1_(r = 18, theta = 0, I = 1, a = -Inf, b = Inf)

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)

Details

Mean for standard normal distribution under consideration is mu = theta * sqrt(I)

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.

Specification

The contents of this section are shown in PDF user manual only.

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))

# Replicate p-value of .0001 by numerical integration of tail
gsdmvn:::h1_(a = qnorm(.9999)) %>% summarise(p = sum(h))

Merck/gsdmvn documentation built on June 30, 2023, 2:09 p.m.