knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
suppressPackageStartupMessages(library(OptGS))

OptGS

Optimal and near-optimal group-sequential designs for clinical trials with continuous outcomes

r badger::badge_cran_release("OptGS", "green") r badger::badge_cran_download("OptGS", "grand-total") r badger::badge_cran_download("OptGS", "last-month") r badger::badge_doi("10.18637/jss.v066.i02", "green") r badger::badge_devel("mjg211/OptGS", "blue") r badger::badge_code_size("mjg211/OptGS") r badger::badge_custom("contributions", "welcome", "blue")

Introduction

OptGS is an R package that provides a suite of functions to assist with the design, analysis, and visualization of randomized two-arm group-sequential clinical trials with continuous outcome variables.

Specifically, support is provided to perform a sample size calculation for popular applicable (non-optimal) designs. The unique focus, however, is on determining optimal and near-optimal designs, using the methods from Wason et al (2012) and Wason (2015) respectively.

Additional functions then allow point estimates to be computed and point estimators to be evaluated. Plotting functions also permit the informative depiction of several important quantities.

Installation

You can install the released version of OptGS from CRAN with:

``` {r, eval = F} install.packages("OptGS")

Alternatively, the current development version from [Github](https://github.com/mjg211/OptGS) can be installed with:

``` {r, eval = F}
devtools::install_github("mjg211/OptGS")

Example: Near-optimal design

This is a basic example, which demonstrates how to determine an optimized power-family design (a near-optimal design), plot its stopping boundaries, determine its operating characteristics, and subsequently produce a plot of the expected sample size curve.

First, determine the design (for the default parameters) with:

des <- des_nearopt()

We can then plot the stopping boundaries of this design with:

plot(des)

The operating characteristics of the design can also be determined with:

opchar <- opchar(des, tau = seq(-des$delta, 2*des$delta,
                                length.out = 100))

Finally, we can then plot the expected sample size and power curves for this design using:

plot(opchar)

Changes: v.1.1.1 vs. v.2.0.0

Between v.1.1.1 (the latest released version on CRAN) and v.2.0.0 (which the current development version on Github has built upon), several major changes were made to OptGS:

Consequently, if all that you require is the functionality presented in Wason (2015), it will likely be quicker to use v.1.1.1 from CRAN, which is a substantially simpler and also faster (in terms of execution time) package.

However, as time progresses, the additional support provided by v.2.0.0+ should make them preferable with some small time investment to understand the purpose of the different functions.

Support

An extensive guide to using OptGS will soon be provided in the form of a package vignette. For v.1.1.1 and earlier, Wason (2015) also provides a detailed introduction to the package.

If you cannot find the answer to a problem, or a function is returning an unexpected error for your inputs, please contact James Wason (james.wason@newcastle.ac.uk) or Michael Grayling (michael.grayling@newcastle.ac.uk) for assistance.

References

Wason JMS (2015) OptGS: An R package for finding near-optimal group-sequential designs. Journal of Statistical Software 66(2):1--13. DOI:10.18637/jss.v066.i02.

Wason JMS, Mander AP, Thompson SG (2012) Optimal multistage designs for randomised clinical trials with continuous outcomes. Statistics in Medicine 31(4):301--312. DOI:10.1002/sim.4421.



mjg211/OptGS documentation built on May 28, 2021, 3:44 p.m.