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


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