plotNT.sup: Plotting N-T Plane for Decision on Performing an Interim...

Description Usage Arguments Details Value References Examples

View source: R/plotNTsup.R

Description

The package plots N-T plane for decision for conducting an interim analysis in a randomized control trial. The functions for interim analysis expecting early stopping for superiority and futility are prepared respectively.

Usage

1
2
3
4
5
6
plotNT.sup(p0, M, q, alpha1,
            xlab = "N: Number of patients at interim analysis",
            ylab = "T: Number of responders at interim analysis",
            col = "blue",
            main = "N-T plot",
            lty = 1,...)

Arguments

p0

Expected response rate for the control arm: scalar or vector. the value between 0 to 1.

M

Total number of patients: expected number of patients until last time.

q

Allocation ratio of the treatment arm: the value between 0 to 1.

alpha1

Critical alpha at an interim analysis.

xlab

Label name for x-axis in N-T plot.

ylab

Label name for y-axis in N-T plot.

col

Line color. Default is "blue". For multiple p0, set the same length of color with p0.

main

Main title in N-T plot.

lty

Line type. The default is 1 for early stopping for superiority.

...

Other graphics parameters

Details

For more details, please refer to the vignette: browseVignettes(package = "IAbin")

Value

A matrix or list with variable names N, T, Z_score and P_val.

Draw N-T plot for early stopping for futility

x axis:

N (Total number of patients at interim analysis)

y axis:

T (Total number of responders at interim analysis)

References

Decision on Performing Interim Analysis for Comparative Clinical Trials

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#--- Settings ---#
#--- With an expected parameter for control therapy ---#
p0 = 0.5
M = 135
q = 2/3
alpha1 = 0.01

#--- N-T plot for early stopping for superiority ---#
NT_s = plotNT.sup(p0, M, q, alpha1)
print(NT_s)

#--- Settings ---#
#--- With several expected parameters for control therapy ---#
p0 = c(0.2, 0.4, 0.6)
M = 135
q = 2/3
alpha1 = 0.01
col = c(1, 2, 3)

#--- N-T plot for early stopping for superiority ---#
NT_s3 = plotNT.sup(p0, M, q, alpha1, col=col)
print(NT_s3)

IAbin documentation built on May 1, 2019, 11:24 p.m.

Related to plotNT.sup in IAbin...