rpact (R Package for Adaptive Clinical Trials) is a R package that enables the design and analysis of confirmatory adaptive clinical trials with continuous, binary, and survival endpoint.
Installation
Installation from CRAN
# The easiest way to get rpact is to install it from cran: install.packages("rpact")
Installation of the latest developer version
Please follow the instructions described here.
Basic Functions and Classes
Design Functions
- getDesignGroupSequential()
- getDesignInverseNormal()
- getDesignFisher()
- getDesignCharacteristics()
Sample Size Calculation Functions
- getSampleSizeMeans()
- getSampleSizeRates()
- getSampleSizeSurvival()
Power Calculation Functions
- getPowerMeans()
- getPowerRates()
- getPowerSurvival()
Simulation Functions
- getSimulationMeans()
- getSimulationRates()
- getSimulationSurvival()
- getSimulationMultiArmMeans()
- getSimulationMultiArmRates()
- getSimulationMultiArmSurvival()
Dataset and Analysis Results Functions
- getDataset()
- getAnalysisResults()
- getStageResults()
Plot Functions
Take a look at the appearance and graphical output of the rpact packageUsage
Getting started
# load the package library(rpact) # display the manual of the package help(package = "rpact") # create an inverse normal design with default parameters design <- getDesignInverseNormal() # take a look at the design and its default values design # display the design characteristics getDesignCharacteristics(design) # plot the design with default type 1 (Boundary Plot) plot(design) # create an 'Average Sample Size and Power / Early Stop' plot plot(design, type = 2, nMax = 12)
Working with datasets
# create a group sequential design design <- getDesignGroupSequential(kMax = 4, alpha = 0.025, informationRates = c(0.2, 0.5, 0.8, 1), futilityBounds = rep(0.5244, 4 - 1), typeOfDesign = "WT", deltaWT = 0.45) # take a look at the design design # create a dataset of means data <- getDataset( n1 = c(22, 11, 22, 11), n2 = c(22, 13, 22, 13), means1 = c(1, 1.1, 1, 1), means2 = c(1.4, 1.5, 3, 2.5), stds1 = c(1, 2, 2, 1.3), stds2 = c(1, 2, 2, 1.3)) # display the stage results getStageResults(design = design, dataInput = data, stage = 3) # display the analysis results getAnalysisResults(design = design, dataInput = data, equalVariances = TRUE, stage = stage, nPlanned = rep(10, kMax - stage), thetaH0 = 0, thetaH1 = 1.3, allocationRatioPlanned = 2)
Getting help
Training Courses
Please contact us and ask for more information about our training courses.
Online Help
Training Courses
Please contact us and ask for more information about our training courses.Online Help
The online documentation (help files) can be opened here: https://www.rpact.org/documentation
Additionally there are two different pdf versions of the manual available:
- rpact_v3_0.3_quick_start_guide.pdf (recommended for beginners)
- rpact_v3_0.3_manual.pdf
Vignettes
Tutorials and vignettes can be found here: VignettesIncluded Help
Bugs and Issues
Please use our bug report form to submit bug descriptions and issues in a systematic way: https://bugreport.rpact.orgFunctional Range
Design and analysis of confirmatory adaptive clinical trials with continuous, binary, and survival endpoints according to the methods described in the monograph by Wassmer and Brannath (2016)