Skip to contents

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

Usage

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.

Specification

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

Examples

library(dplyr)
# 2nd analysis with no interim bound and drift 0 should have mean 0, variance 1
gsdmvn:::hupdate_() %>% summarise(mu = sum(z * h), var = sum((z - mu)^2 * h))
#> # A tibble: 1 × 2
#>         mu   var
#>      <dbl> <dbl>
#> 1 4.83e-18  1.00