From 223ab3cd1b6ce291f0c650f6e10ac94ef251912c Mon Sep 17 00:00:00 2001 From: Roman Pahl Date: Sat, 3 Feb 2024 12:10:57 +0100 Subject: [PATCH] use pure markdown in intro vignette as it was shown incorrectly on CRAN --- DESCRIPTION | 2 +- docs/404.html | 4 +- docs/articles/GroupSeq.html | 225 ++++++------ docs/articles/index.html | 161 +++------ docs/articles/task-1-compute-bounds-H0.html | 195 ++++++---- docs/articles/task-2-compute-drift.html | 113 ++++-- docs/articles/task-3-compute-bounds-H1.html | 78 ++-- docs/articles/task-4-compute-CI.html | 60 ++-- docs/articles/understanding-gs-designs.html | 337 +++++++++++++----- .../figure-html/unnamed-chunk-11-1.png | Bin 889429 -> 887895 bytes .../figure-html/unnamed-chunk-13-1.png | Bin 884681 -> 883110 bytes .../figure-html/unnamed-chunk-14-1.png | Bin 107860 -> 108025 bytes .../figure-html/unnamed-chunk-15-1.png | Bin 97635 -> 97788 bytes .../figure-html/unnamed-chunk-2-1.png | Bin 54269 -> 54394 bytes .../figure-html/unnamed-chunk-23-1.png | Bin 88978 -> 88997 bytes .../figure-html/unnamed-chunk-24-1.png | Bin 147901 -> 147913 bytes .../figure-html/unnamed-chunk-26-1.png | Bin 727357 -> 726872 bytes .../figure-html/unnamed-chunk-26-2.png | Bin 723097 -> 722570 bytes .../figure-html/unnamed-chunk-5-1.png | Bin 98706 -> 98910 bytes docs/authors.html | 12 +- docs/index.html | 19 +- docs/news/index.html | 183 +++------- docs/pkgdown.css | 83 +++-- docs/pkgdown.js | 4 +- docs/pkgdown.yml | 6 +- docs/reference/index.html | 168 ++------- docs/reference/start_gui.html | 156 +++----- docs/sitemap.xml | 42 ++- vignettes/GroupSeq.Rmd | 93 ++--- 29 files changed, 966 insertions(+), 975 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9355432..57fbad9 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: GroupSeq Title: Group Sequential Design Probabilities - With Graphical User Interface -Version: 1.4.2 +Version: 1.4.3 Authors@R: person("Roman", "Pahl", email = "roman.pahl@gmail.com", role = c("aut", "cre")) diff --git a/docs/404.html b/docs/404.html index cd19137..ba9806a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -39,7 +39,7 @@ GroupSeq - 1.4.2 + 1.4.3 @@ -178,7 +178,7 @@

Page not found (404)

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/GroupSeq.html b/docs/articles/GroupSeq.html index b50d0db..b59e2fa 100644 --- a/docs/articles/GroupSeq.html +++ b/docs/articles/GroupSeq.html @@ -27,6 +27,8 @@ + +
+
-

Group sequential designs in essence allow to lower the sample size of clinical or other studies. To be clear - if a group sequentially designed study is conducted until the final analysis, that is, without aborting at one of the interim looks, the required sample will be larger compared to a simple single stage study, because you have to “pay” for the added interim analyses to prevent alpha inflation.

-

But, from time to time, especially if the underlying effect is strong (e.g. you have a very potent medicine), you will abort the study early and this on average leads to lower sample sizes, or in other words, the expected sample size of group sequential designs is lower than the sample size of comparable studies with just one final analysis.

-

If you want to get an intuitive understanding on how probabilities of group sequential designs are calculated, please see the vignette Understanding group sequential designs.

-

The GroupSeq package can be used to perform basic calculations related to group sequential designs. At this point, the functionality is mainly provided via a graphical user interface. The interface was designed such that each calculation can be opened in separate windows allowing to compute and compare arbitrary many designs in parallel.

-

The following section gives a brief overview of all the available options with links to further details.

-
-

-GroupSeq menu

+

Group sequential designs in essence allow to lower the sample size of +clinical or other studies. To be clear - if a group sequentially +designed study is conducted until the final analysis, that is, without +aborting at one of the interim looks, the required sample will be larger +compared to a simple single stage study, because you have to “pay” for +the added interim analyses to prevent alpha +inflation.

+

But, from time to time, especially if the underlying effect is strong +(e.g. you have a very potent medicine), you will abort the study early +and this on average leads to lower sample sizes, or in other words, the +expected sample size of group sequential designs is lower than the +sample size of comparable studies with just one final analysis.

+

If you want to get an intuitive understanding on how probabilities of +group sequential designs are calculated, please see the vignette Understanding +group sequential designs.

+

The GroupSeq package can be used to perform basic calculations +related to group sequential designs. At this point, the functionality is +mainly provided via a graphical user interface. The interface was +designed such that each calculation can be opened in separate windows +allowing to compute and compare arbitrary many designs in parallel.

+

The following section gives a brief overview of all the available +options with links to further details.

+
+

GroupSeq menu +

Loading the library opens the main GroupSeq window.

+library("GroupSeq")


-

The menu lists four possible tasks. To select a task, you have to select a row and hit the Perform Selected Task button. Each task opens in a new window and it’s also possible to open multiple windows of the same task in parallel. For a detailed description of the respective task follow one of the links below:

-
-

--1- Compute Bounds +

The menu lists four possible tasks. To select a task, you have to +select a row and hit the Perform Selected Task button. Each +task opens in a new window and it’s also possible to open multiple +windows of the same task in parallel. For a detailed description of the +respective task follow one of the links below:

+
+

+-1- +Compute Bounds

-

Use this to compute the boundaries of group sequential designs under the null hypothesis (H0), that is, under a given significance level alpha (usually 5%).

- - - -
-1- Compute Bounds - +

Use this to compute the boundaries of group sequential designs under +the null hypothesis (H0), that is, under a given +significance level alpha (usually 5%).

+

    -
  • -Computes group sequential bounds under the null hypothesis for given overall significance level. -
  • -
  • -Bounds can be one- or two-sided or completely asymmetric. -
  • -
  • -User chooses number of stages and some alpha spending function. -
  • +
  • Computes group sequential bounds under the null hypothesis for given +overall significance level.
  • +
  • Bounds can be one- or two-sided or completely asymmetric.
  • +
  • User chooses number of stages and some alpha spending function.
-
-


-
-

--2- Compute Drift given Power and Bounds +
+

+-2- +Compute Drift given Power and Bounds

-

Use this to compute the target effect size of a group sequential design, which maintains a certain power (e.g. power = 80%).

- - - -
--2- Compute Drift given Power and Bounds - +

Use this to compute the target effect size of a group sequential +design, which maintains a certain power (e.g. power = 80%).

+

    -
  • -Computes drift (i.e. standardized effect size) required to achieve desired power of a given group sequential design. -
  • -
  • -The group sequential design is defined via alpha spending functions or custom critical bounds. -
  • -
  • -Bounds can be one- or two-sided or completely asymmetric. -
  • -
  • -User chooses number of stages. -
  • +
  • Computes drift (i.e. standardized effect size) required to achieve +desired power of a given group sequential design.
  • +
  • The group sequential design is defined via alpha spending functions +or custom critical bounds.
  • +
  • Bounds can be one- or two-sided or completely asymmetric.
  • +
  • User chooses number of stages.
-
-


-
-

--3- Compute Probabilities given Bounds and Drift +
+

+-3- +Compute Probabilities given Bounds and Drift

Use this to compute the power of a group sequential design.

- - - -
--3- Compute Probabilities given Bounds and Drift - +

    -
  • -Computes power that is achieved by a group sequential design given some drift (i.e. standardized effect size). -
  • -
  • -The group sequential design is defined via alpha spending functions or custom critical bounds. -
  • -
  • -Bounds can be one- or two-sided or completely asymmetric. -
  • -
  • -User chooses number of stages. -
  • +
  • Computes power that is achieved by a group sequential design given +some drift (i.e. standardized effect size).
  • +
  • The group sequential design is defined via alpha spending functions +or custom critical bounds.
  • +
  • Bounds can be one- or two-sided or completely asymmetric.
  • +
  • User chooses number of stages.
-
-


-
-

--4- Compute Confidence Interval +
+

+-4- +Compute Confidence Interval

-

Use this to compute the confidence intervals for the target outcome at the final analysis, which can be the last stage as planned or at an earlier stage exceeding the critical bounds and therefore stopping early.

- - - -
--4- Compute Confidence Interval - +

Use this to compute the confidence intervals for the target outcome +at the final analysis, which can be the last stage as planned or at an +earlier stage exceeding the critical bounds and therefore stopping +early.

+

    -
  • -Compute confidence interval at final analysis stage for given expected effect size. -
  • -
  • -The group sequential design is defined via alpha spending functions or custom critical bounds. -
  • -
  • -Bounds can be one- or two-sided or completely asymmetric. -
  • -
  • -User chooses number of stages and confidence level. -
  • +
  • Computes confidence interval at final analysis stage for given +expected effect size.
  • +
  • The group sequential design is defined via alpha spending functions +or custom critical bounds.
  • +
  • Bounds can be one- or two-sided or completely asymmetric.
  • +
  • User chooses number of stages and confidence level.
-
-


-

To close the application and, with it, all open windows, just close the main window or hit the QUIT GroupSeq button.

+

To close the application and, with it, all open windows, just close +the main window or hit the QUIT GroupSeq button.

@@ -299,11 +284,13 @@

@@ -312,5 +299,7 @@

+ + diff --git a/docs/articles/index.html b/docs/articles/index.html index a626b0b..0f67a2b 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,74 +1,12 @@ - - - - - - - -Articles • GroupSeq - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Articles • GroupSeq + + - - - - -
-
- -
- -
+
+
Understanding group sequential designs
+

See this vignette if you want to understand how group sequential design probabilities are calculated and gain an intuitive understanding of the underlying methods.

+
Introduction to GroupSeq
+

Start here if this is your first time using GroupSeq. This vignette gives a brief overview of what can be done with GroupSeq.

+
-1- Compute Bounds
+

This vignette shows how to use GroupSeq to compute group sequential designs under the null hypothesis, introduces all available options and discusses some nuances of certain design types.

+
-2- Compute Drift given Power and Bounds
+

This vignette shows how to use GroupSeq to compute group sequential designs with a certain power and how to interpret the results.

+
-3- Compute Probabilities given Bounds and Drift
+

This vignette shows how to use GroupSeq to compute group sequential probabilities under both H0 or H1.

+
-4- Compute Confidence Interval
+

This vignette shows how to use GroupSeq to compute confidence intervals at the final stage of a group sequential analysis.

+
-
- - + + diff --git a/docs/articles/task-1-compute-bounds-H0.html b/docs/articles/task-1-compute-bounds-H0.html index 4086e0d..c9b3819 100644 --- a/docs/articles/task-1-compute-bounds-H0.html +++ b/docs/articles/task-1-compute-bounds-H0.html @@ -27,6 +27,8 @@ + +
+
@@ -165,75 +169,142 @@

-1- Compute Bounds

The option -1- menu initially looks as follows.

-
-

-Single stage

-

As a first example, let’s hit the CALCULATE button, which should open a new window with the following results.

+
+

Single stage +

+

As a first example, let’s hit the CALCULATE button, +which should open a new window with the following results.

-

Since the number stages was set to \(K = 1\), we just calculated one-sided bounds for a simple 1-stage design, which is equivalent to

+

Since the number stages was set to \(K = +1\), we just calculated one-sided bounds for a simple 1-stage +design, which is equivalent to

-alpha = 0.05
-qnorm(1 - alpha)
-# [1] 1.644854
+alpha = 0.05 +qnorm(1 - alpha) +# [1] 1.644853627
-
-

-O’Brien-Fleming 3-stage design

-

To obtain a true group sequential design, we have to select \(K > 1\) stages. The number of stages is chosen at the top of the window. Note that in GroupSeq this is called #Interim Times, which means that the final analysis also is treated as an ‘interim time’. Thus, for a 3-stage design, we select \(K = 3\).

+
+

O’Brien-Fleming 3-stage design +

+

To obtain a true group sequential design, we have to select \(K > 1\) stages. The number of stages is +chosen at the top of the window. Note that in GroupSeq this is called +#Interim Times, which means that the final analysis also is +treated as an ‘interim time’. Thus, for a 3-stage design, we select +\(K = 3\).


Hit CALCULATE to compute the 3-stage design.


-

In the second to last column, you see how much alpha is spent at each stage, while in the last column you see the cumulative alpha, which should sum up to the overall significance level (here 5%).

-

Obviously, there are infinitely many ways to split the 5% over the three stages. The default alpha spending strategy in GroupSeq is the O’Brien-Fleming type, which is probably the most popular group sequential design in clinical trials.

-

As you see, the O’Brien-Fleming is very conservative at the early stages of the study so that only 0.069% of alpha is spent at stage 1. The effect therefore would have to be very large in order to exceed the critical upper bound of 3.2 at stage 1 when 33% of the total sample will have been collected.

-

To get a visual impression you can click the Show Graph button in the result window which provides the following plot.

+

In the second to last column, you see how much alpha is spent at each +stage, while in the last column you see the cumulative alpha, which +should sum up to the overall significance level (here 5%).

+

Obviously, there are infinitely many ways to split the 5% over the +three stages. The default alpha spending strategy in GroupSeq is the +O’Brien-Fleming type, which is probably the most popular group +sequential design in clinical trials.

+

As you see, the O’Brien-Fleming is very conservative at the early +stages of the study so that only 0.069% of alpha is spent at stage 1. +The effect therefore would have to be very large in order to exceed the +critical upper bound of 3.2 at stage 1 when 33% of the total sample will +have been collected.

+

To get a visual impression you can click the Show Graph +button in the result window which provides the following plot.

-


The advantage of this conservative strategy is that you still leave enough alpha for the final analysis to reject H0 for significant but moderate effects.

+


The advantage of this conservative strategy is that you still +leave enough alpha for the final analysis to reject H0 for +significant but moderate effects.

-
-

-Pocock 3-stage design

-

Another popular design, which actually had a significant positive impact on the general popularity of group sequential designs in clinical research, is the design by Pocock, which is constructed such the bounds are identical at each stage. Let’s select (5) Exact Pocock Bounds and hit CONFIRM FUNCTION.

+
+

Pocock 3-stage design +

+

Another popular design, which actually had a significant positive +impact on the general popularity of group sequential designs in clinical +research, is the design by Pocock, which is constructed such the bounds +are identical at each stage. Let’s select +(5) Exact Pocock Bounds and hit +CONFIRM FUNCTION.

-


When hitting the CALCULATE button, this time we get the following.

+


When hitting the CALCULATE button, this time we get +the following.

-


The resulting upper bounds are set constant over all stages at 1.99. Obviously this design is more aggressive than the O’Brien-Fleming design in trying to abort early as 0.023% of alpha is already spent at the first stage (see second to last column in above figure).

-

While the critical bounds are constant over all stages, the spent alpha is not. Rather it is decreasing with each stage. This is “caused” by the sample size, which is increasing on later stages, so that, roughly speaking, it gets less likely under H0 to produce a type I error.

+


The resulting upper bounds are set constant over all stages at +1.99. Obviously this design is more aggressive than the O’Brien-Fleming +design in trying to abort early as 0.023% of alpha is already spent at +the first stage (see second to last column in above figure).

+

While the critical bounds are constant over all stages, the spent +alpha is not. Rather it is decreasing with each stage. This is “caused” +by the sample size, which is increasing on later stages, so that, +roughly speaking, it gets less likely under H0 to produce a +type I error.

-
-

-O’Brien-Fleming vs Pocock

-

When comparing the final stage of both designs, the spent alpha in the O’Brien-Fleming design (0.034%) is roughly three times higher than in the Pocock design (0.011%), which means that if the study is not aborted at one of the interim analysis, once you reach the final stage the effect needs to be much higher in the Pocock design to reject H0 at the final stage.

-

Beside the statistical power there are other aspects such as the expected sample size that can be taken into consideration when comparing designs which however goes beyond the scope of this vignette. This is also true with respect to the other available designs1, and it is recommended to consult the literature to study the properties of the different designs.

-

You may have also noted that among the available design functions there is (2) Pocock type, which is is very similar to option (5) Exact Pocock Bounds. The (2) Pocock type is based on the alpha spending approach, which always produces monotonously decreasing bounds and therefore does not yield exact Pocock bounds by definition. Since the Pocock design is very popular, the option of exact Pocock bounds, which are slightly harder to compute, was added to GroupSeq.

+
+

O’Brien-Fleming vs Pocock +

+

When comparing the final stage of both designs, the spent alpha in +the O’Brien-Fleming design (0.034%) is roughly three times higher than +in the Pocock design (0.011%), which means that if the study is not +aborted at one of the interim analysis, once you reach the final stage +the effect needs to be much higher in the Pocock design to reject +H0 at the final stage.

+

Beside the statistical power there are other aspects such as the +expected sample size that can be taken into consideration when comparing +designs which however goes beyond the scope of this vignette. This is +also true with respect to the other available designs1, and it is recommended +to consult the literature to study the properties of the different +designs.

+

You may have also noted that among the available design functions +there is (2) Pocock type, which is is very similar to +option (5) Exact Pocock Bounds. The +(2) Pocock type is based on the alpha spending approach, +which always produces monotonously decreasing bounds and therefore does +not yield exact Pocock bounds by definition. Since the Pocock design is +very popular, the option of exact Pocock bounds, which are slightly +harder to compute, was added to GroupSeq.

-
-

-Non-equidistant interim times

-

To adjust interim times, which by default are equally spaced, the correspondin checkmark has to be deselected.

-


The times are entered manually, for example, lets start a bit later with the first interim look.

+
+

Non-equidistant interim times +

+

To adjust interim times, which by default are equally spaced, the +correspondin checkmark has to be deselected. +

+


The times are entered manually, for example, lets start a bit +later with the first interim look.


and CALCULATE.

-


We see that this leads to slightly lower bounds, which seems about right as this design is less aggressive to abort the study early.

+


We see that this leads to slightly lower bounds, which seems +about right as this design is less aggressive to abort the study +early.

-
-

-Two-Sided bounds

-

Last but not least, the designs can be calculated for the two-sided symmetric

+
+

Two-Sided bounds +

+

Last but not least, the designs can be calculated for the two-sided +symmetric


as well as the two-sided asymmetric case.

-


Naturally, the alpha is split up symmetrically, but can be customized if needed. Also the alpha spending function has to be set separately for each side. As an example, lets go with O’Brien-Fleming and Pocock again (don’t forget to hit the CONFIRM FUNCTION buttons).

+


Naturally, the alpha is split up symmetrically, but can be +customized if needed. Also the alpha spending function has to be set +separately for each side. As an example, lets go with O’Brien-Fleming +and Pocock again (don’t forget to hit the CONFIRM FUNCTION +buttons).

-


Looking at the stage-wise alpha spending, we literally end up with a mixture of both designs as there is some alpha spend on the early stages but still saved some for the last stage.

-

So this is mainly what can be done with GroupSeq to construct designs under H0. Next lets see how to calculate probabilities under H1 and specifically to determine the effect size that is required to achieve a certain probability (i.e. power) to detect an existing effect, which can be done via the second menu option: -2- Compute Drift given Power and Bounds

+


Looking at the stage-wise alpha spending, we literally end up +with a mixture of both designs as there is some alpha spend on the early +stages but still saved some for the last stage.

+

So this is mainly what can be done with GroupSeq to construct designs +under H0. Next lets see how to calculate probabilities +under H1 and specifically to determine the effect size that +is required to achieve a certain probability (i.e. power) to detect an +existing effect, which can be done via the second menu option: -2- +Compute Drift given Power and Bounds

-
+

    -
  1. To be exact, these are alpha spending functions, which lead to certain types of designs.↩︎

  2. +
  3. To be exact, these are alpha spending functions, which +lead to certain types of designs.↩︎

@@ -247,11 +318,13 @@

@@ -260,5 +333,7 @@

+ + diff --git a/docs/articles/task-2-compute-drift.html b/docs/articles/task-2-compute-drift.html index b132cea..d95adc8 100644 --- a/docs/articles/task-2-compute-drift.html +++ b/docs/articles/task-2-compute-drift.html @@ -27,6 +27,8 @@ + +
+
-

If you haven’t seen the vignette -1- Compute Bounds, it is recommended to visit this one first.

+

If you haven’t seen the vignette -1- +Compute Bounds, it is recommended to visit this one first.

The option -2- menu initially looks as follows.

-
-

-O’Brien-Fleming 3-stage design

-


For a start lets set K=3 stages and CALCULATE.

+
+

O’Brien-Fleming 3-stage design +

+


For a start lets set K=3 stages and +CALCULATE.

-


The design maintains the power of 80%. The second to last column provides the Exit Probability for each stage. As is typical for O’Brien-Fleming designs, the probability to abort the study at the first interim look is very low (here 4%) even under H1. Then on the second stage, it’s 42% and cumulative almost a 50% chance of having the study aborted by then and finally in one third of the cases the effect is detected at the last stage while in the remaining 20% of cases H0 will be accepted and the effect stays undetected. These probabilities are all valid if the true drift (i.e. true standardized effect size) is 2.51.

+


The design maintains the power of 80%. The second to last column +provides the Exit Probability for each stage. As is typical +for O’Brien-Fleming designs, the probability to abort the study at the +first interim look is very low (here 4%) even under H1. +Then on the second stage, it’s 42% and cumulative almost a 50% chance of +having the study aborted by then and finally in one third of the cases +the effect is detected at the last stage while in the remaining 20% of +cases H0 will be accepted and the effect stays undetected. +These probabilities are all valid if the true drift (i.e. true +standardized effect size) is 2.51.

-
-

-Pocock 3-stage design

+
+

Pocock 3-stage design +

Next lets see the required drift if we use a Pocock design.

-

Apparently, to achieve a power of 80%, this design requires an effect of 2.71, which is 8% higher than that of the O’Brien-Fleming designs. Comparing the power of both designs for a specific drift, is discussed in -3- Compute Probabilities given Bounds and Drift.

-

With the Pocock design on the other hand you will be able to abort the study at the first interim look in about 33% of the cases, so if you are optimistic about your expected effect, the Pocock design might be the better choice as it will result in lower required samples on average and thereby a faster study conclusion.

-

To change the desired power, just edit the value in the input window.

+

Apparently, to achieve a power of 80%, this design requires an effect +of 2.71, which is 8% higher than that of the O’Brien-Fleming designs. +Comparing the power of both designs for a specific drift, is discussed +in -3- +Compute Probabilities given Bounds and Drift.

+

With the Pocock design on the other hand you will be able to abort +the study at the first interim look in about 33% of the cases, so if you +are optimistic about your expected effect, the Pocock design might be +the better choice as it will result in lower required samples on average +and thereby a faster study conclusion.

+

To change the desired power, just edit the value in the input +window.


If we re-CALCULATE, we get

-


As expected the required drift has increased to now 3.16, but there is also something interesting to the resulting exit probabilities as basically the 10% increase in power was “added” to the first interim look, which now has a probability of 43% to succeed. Also the exit probability at the final stage even has been decreased slightly.

-

First of all, this is good news, of course, because it means that it has become less likely that the full sample is required to come to a conclusion. Intuitively, this also makes sense, because a stronger effect indicated by the higher drift (on average) will be detected earlier than a weaker effect.

+


As expected the required drift has increased to now 3.16, but +there is also something interesting to the resulting exit probabilities +as basically the 10% increase in power was “added” to the first interim +look, which now has a probability of 43% to succeed. Also the exit +probability at the final stage even has been decreased slightly.

+

First of all, this is good news, of course, because it means that it +has become less likely that the full sample is required to come to a +conclusion. Intuitively, this also makes sense, because a stronger +effect indicated by the higher drift (on average) will be detected +earlier than a weaker effect.

-
-

-Manual bounds

-

In order to enable the computation of drift for arbitrary designs, you can enter bounds manually.

+
+

Manual bounds +

+

In order to enable the computation of drift for arbitrary designs, +you can enter bounds manually.

-


Hitting CALCULATE for the default bounds 1, 2, 3, we get

+


Hitting CALCULATE for the default bounds 1, 2, 3, +we get

-


This design maintains the specified power, if the drift was 3.355, but it does not maintain the 5% alpha level under H0 (drift = 0).

-

To see this, check out the next vignette -3- Compute Probabilities given Bounds and Drift

+


This design maintains the specified power, if the drift was +3.355, but it does not maintain the 5% alpha level under H0 +(drift = 0).

+

To see this, check out the next vignette -3- +Compute Probabilities given Bounds and Drift

@@ -208,11 +245,13 @@

@@ -221,5 +260,7 @@

+ + diff --git a/docs/articles/task-3-compute-bounds-H1.html b/docs/articles/task-3-compute-bounds-H1.html index 328c9c1..a6dc67f 100644 --- a/docs/articles/task-3-compute-bounds-H1.html +++ b/docs/articles/task-3-compute-bounds-H1.html @@ -18,7 +18,7 @@ - + +
+
-

This vignette builds right on -2- Compute Drift given Power and Bounds so if you haven’t seen the vignette it is recommended to visit this one first.

-

Taking forward the example from the last vignette, we want three stages of manual bounds and enter a drift of 3.3553.

+

This vignette builds right on -2- +Compute Drift given Power and Bounds so if you haven’t seen the +vignette it is recommended to visit this one first.

+

Taking forward the example from the last vignette, we want three +stages of manual bounds and enter a drift of 3.3553.

which CALCULATEs to

-

yielding about 90% of cumulative exit probability, which corresponds to the study power assuming a standardized effect size of 3.3553. To see the type I error of this design, that is, the probability under H0, we simply set the drift to zero.

+

yielding about 90% of cumulative exit probability, which corresponds +to the study power assuming a standardized effect size of 3.3553. To see +the type I error of this design, that is, the probability under H0, we +simply set the drift to zero.

ReCALCULATE gives

-

thereby resulting in a type I error of about 16.3%, which clearly exceeds the typically allowed level of 5%. As such the design is not valid.

-

To get closer to 5% we now could start adjusting the bounds bit by bit. For example, as the design already spends 15.8% of alpha at stage 1, lets increase the first stage bound to two.

+

thereby resulting in a type I error of about 16.3%, which clearly +exceeds the typically allowed level of 5%. As such the design is not +valid.

+

To get closer to 5% we now could start adjusting the bounds bit by +bit. For example, as the design already spends 15.8% of alpha at stage +1, lets increase the first stage bound to two.

-

The type I error drops to about 3.8% so now we are a bit too conservative and could further adjust. If we set the last bound to 2 as well, we actually end up with a classic Pocock design.

+

The type I error drops to about 3.8% so now we are a bit too +conservative and could further adjust. If we set the last bound to 2 as +well, we actually end up with a classic Pocock design.

-

Very close already and of course the easiest way to get a Pocock design with exactly 5% alpha level is to abort manual bounds and revert back to using the corresponding function.

+

Very close already and of course the easiest way to get a Pocock +design with exactly 5% alpha level is to abort manual bounds and revert +back to using the corresponding function.

-

Last but not least lets calculate the power for this design, if the drift is 2,

+

Last but not least lets calculate the power for this design, if the +drift is 2,

which apparently gives about 56.6%.

-

In the last vignette of this series we will see how to -4- Compute Confidence Intervals at the final stage of a group sequential study.

+

In the last vignette of this series we will see how to -4- +Compute Confidence Intervals at the final stage of a group +sequential study.