# The easiest way to get rpact is to install it from cran:
install.packages("rpact")rpact: Confirmatory Adaptive Clinical Trial Design, Simulation, and Analysis
A validated, open source, free-of-charge R software package
rpact is a comprehensive validated, open source, free-of-charge R software package for:
- Clinical trial planning
- Clinical trial design evaluation and simulation
- Clinical trial data analysis
Functional Range
- Fixed sample design and designs with interim analysis stages
- Sample size and power calculation for
- means (continuous endpoint)
- rates (binary endpoint)
- survival trials with flexible recruitment and survival time options
- count data
- Simulation tool for means, rates, survival data, and count data
- Assessment of adaptive sample size/event number recalculations based on conditional power
- Assessment of treatment selection strategies in multi-arm trials
- Adaptive analysis of means, rates, and survival data
- Adaptive designs and analysis for multi-arm trials
- Adaptive analysis and simulation tools for enrichment design testing means, rates, and hazard ratios
- Automatic boundary recalculations during the trial for analysis with alpha spending approach, including under- and over-running
Installation
Installation from CRAN
Installation of the Developer Version
To use a feature from the development version, you can install the development version of rpact from GitHub.
# install.packages("pak")
pak::pak("rpact-com/rpact")Learn To Use rpact
We recommend three ways to learn how to use rpact:
- Use the Shiny app “RPACT Cloud”: cloud.rpact.com
- Use the rpact vignettes
- Book a training: www.rpact.com/services
Vignettes
- The open access vignettes are hosted at www.rpact.org/vignettes
- The exclusive vignettes are hosted at www.rpact.com/vignettes
Online Help
The online documentation (help files) can be opened here: rpact-com.github.io/rpact/reference
Additionally there are two different pdf versions of the manual available:
- rpact_v4_2.1_quick_start_guide.pdf (recommended for beginners)
- rpact_v4_2.1_manual.pdf
Inline Help
# display the manual of the package
help(package = "rpact")Getting Started
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
# create a summary ouput of the design
design |>
summary()
# display the design characteristics
design |>
getDesignCharacteristics()
# plot the design with default type 1 (Boundary Plot)
design |>
plot()
# create an 'Average Sample Size and Power / Early Stop' plot
design |>
plot(type = 6, 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),
stDev1 = c( 1, 2, 2, 1.3),
stDev2 = c( 1, 2, 2, 1.3)
)
# display the stage results
design |>
getStageResults(dataInput = data, stage = 3)
# display the analysis results
design |>
getAnalysisResults(
dataInput = data,
equalVariances = TRUE,
stage = 2,
nPlanned = c(10, 10),
thetaH0 = 0,
thetaH1 = 1.3,
allocationRatioPlanned = 2
)User Concept
Workflow
- Everything is starting with a design, e.g.:
design <- getDesignGroupSequential() - Find the optimal design parameters with help of rpact comparison tools:
getDesignSet - Calculate the required sample size, e.g.:
getSampleSizeMeans(),getPowerMeans() - Simulate specific characteristics of an adaptive design, e.g.:
getSimulationMeans() - Collect your data, import it into R and create a dataset:
data <- getDataset() - Analyze your data:
getAnalysisResults(design, data)
Focus on Usability
The most important rpact functions have intuitive names:
getDesign[GroupSequential/InverseNormal/Fisher]()getDesignCharacteristics()getSampleSize[Means/Rates/Survival/Counts]()getPower[Means/Rates/Survival/Counts]()getSimulation[MultiArm/Enrichment][Means/Rates/Survival]()getDataSet()getAnalysisResults()getStageResults()
RStudio / Eclipse: auto code completion makes it easy to use these functions.
R generics
In general, everything runs with the R standard functions which are always present in R: so-called R generics, e.g., print, summary, plot, as.data.frame, names, length
Utilities
Several utility functions are available, e.g.
getAccrualTime()getPiecewiseSurvivalTime()getNumberOfSubjects()getEventProbabilities()getPiecewiseExponentialDistribution()- survival helper functions for conversion of
pi,lambdaandmedian, e.g.,getLambdaByMedian() testPackage(): installation qualification on a client computer or company server (via unit tests)
RPACT Connect
Connecting you to insights, downloads, and premium support: connect.rpact.com
Validation
Please contact us to learn how to use rpact on FDA/GxP-compliant validated corporate computer systems and how to get a copy of the formal validation documentation that is customized and licensed for exclusive use by your company, e.g., to fulfill regulatory requirements.
About
- rpact is a comprehensive validated1 R package for clinical research which
- enables the design and analysis of confirmatory adaptive group sequential designs
- is a powerful sample size calculator
- is a free of charge open-source software licensed under LGPL-3
- particularly, implements the methods described in the recent monograph by Wassmer and Brannath (2016)
For more information please visit www.rpact.com/products
- RPACT is a company which offers
- enterprise software development services
- technical support for the rpact package
- consultancy and user training for clinical research using R
- validated software solutions and R package development for clinical research
For more information please visit www.rpact.com/services
Contact
- For general requests please send an email to
- Please send your support request to
- Or use our contact form at www.rpact.com/contact
Bugs and Issues
Please use the github bug report form to submit bug descriptions and issues in a systematic way: github.com/rpact-com/rpact/issues
Recommended Vignette
Footnotes
The rpact validation documentation is available exclusively for our customers and supporting companies. For more information visit www.rpact.com/services/sla↩︎


