errorSpent {lrstat}R Documentation

Error spending

Description

Obtains the error spent at given spending times for the specified error spending function.

Usage

errorSpent(t, error, sf = "sfOF", sfpar = NA)

Arguments

t

A vector of spending times, typically equal to information fractions.

error

The total error to spend.

sf

The spending function. One of the following: "sfOF" for O'Brien-Fleming type spending function, "sfP" for Pocock type spending function, "sfKD" for Kim & DeMets spending function, and "sfHSD" for Hwang, Shi & DeCani spending function. Defaults to "sfOF".

sfpar

The parameter for the spending function. Corresponds to rho for "sfKD" and gamma for "sfHSD".

Value

A vector of errors spent up to the interim look.

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples

errorSpent(t = 0.5, error = 0.025, sf = "sfOF")
errorSpent(t = c(0.5, 0.75, 1), error = 0.025, sf = "sfHSD", sfpar = -4)


[Package lrstat version 0.2.6 Index]