\documentclass{article}
\usepackage{hyperref}
\usepackage{graphics}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage[utf8]{inputenc}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\DeclareMathOperator{\var}{var}
% \VignetteIndexEntry{Using GrpSeqBnds}
\begin{document}
<>=
options(keep.source = TRUE, width = 70)
PwrGSDpd <- packageDescription("PwrGSD")
library(PwrGSD)
@
\title{Calculation of Efficacy and Futiltiy Boundaries using GrpSeqBnds (Version \Sexpr{PwrGSDpd$Version})}
\author{Grant Izmirlian}
\maketitle
\section{Introduction}
The function $\mathbf{GrpSeqBnds}$ computes efficacy and futility boundaries given the
stipulation of the information fraction, total type I and type II error probabilities and method
of boundary construction. The efficacy and futility boundaries can be constructed either
simulataneously or one at a time. The function also allows for two information scales.
The following sequence of variance fractions resulted from a trial with 7 or so years of accrual
and maximum follow-up of 20 years using the stopped Fleming-Harrington weights, $\mathbf{SFH}(0,1,10)$.
<>=
frac <- c(0.006995655, 0.01444565, 0.02682463, 0.04641363, 0.0585665,
0.07614902, 0.1135391, 0.168252, 0.2336901, 0.3186155, 0.4164776,
0.5352199, 0.670739, 0.8246061, 1)
@
The same settings resulted in the following sequence of event ratios:
<>=
frac.ii <- c(0.1494354, 0.1972965, 0.2625075, 0.3274323, 0.3519184, 0.40231,
0.4673037, 0.5579035, 0.6080742, 0.6982293, 0.7671917, 0.8195019,
0.9045182, 0.9515884, 1)
@
The $\mathbf{SFH}(0,1,10)$ statistic together with an average effect of $20\%$
reduction in risk, subjected to contamination and dropout, resulted in the
following sequence of drift function values. Recall that the drift function
is the expected value of the statistic at a given alternative hypothesis. The
scale is always the same as the main (first) information scale.
<>=
drift <- c(0.06214444, 0.1061856, 0.1731267, 0.2641265, 0.3105231, 0.3836636,
0.5117394, 0.6918584, 0.8657705, 1.091984, 1.311094, 1.538582,
1.818346, 2.081775, 2.345386)
@
\begin{itemize}
\item[1.]{{\bf One Sided Efficacy Boundary}\\
In this example, we calculate a one sided efficacy boundary at each of 15 analyses which
will occur at the given (known) variance ratios, and we use the variance ratio for type I
error probability spending, with a total type I error probabilty of 0.05, using the
Lan-Demets method with Obrien-Fleming spending (the default). We plot the resulting boundary.
<>=
example.1 <- GrpSeqBnds(frac=frac,
EfficacyBoundary=LanDemets(alpha=0.05, spending=ObrienFleming))
@
<