hupdate: Update numerical integration for group sequential design

Description Usage Arguments Value Examples

View source: R/hupdate.r

Description

Update grid points for numerical integration from one analysis to the next

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hupdate(
  r = 18,
  theta = 0,
  I = 2,
  a = -Inf,
  b = Inf,
  thetam1 = 0,
  Im1 = 1,
  gm1 = h1()
)

Arguments

r

Integer, at least 2; default of 18 recommended by Jennison and Turnbull

theta

Drift parameter for current analysis

I

Information at current analysis

a

lower limit of integration (scalar)

b

upper limit of integration (scalar > a)

thetam1

Drift parameter for previous analysis

Im1

Information at previous analysis

gm1

numerical integration grid from h1() or previous run of hupdate()

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

1
2
# 2nd analysis with no interim bound and drift 0 should have mean 0, variance 1
hupdate() %>% summarise(mu = sum(z * h), var = sum((z - mu)^2 * h))

keaven/gsdmvn documentation built on May 30, 2021, 9:49 a.m.