# rpact [![](https://www.r-pkg.org/badges/version/rpact)](https://cran.r-project.org/package=rpact) [![R-CMD-check](https://github.com/rpact-com/rpact/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rpact-com/rpact/actions/workflows/R-CMD-check.yaml) [![Total downloads](https://cranlogs.r-pkg.org/badges/grand-total/rpact?color=blue)](https://CRAN.R-project.org/package=rpact) [![Monthly downloads](https://cranlogs.r-pkg.org/badges/rpact?color=blue)](https://CRAN.R-project.org/package=rpact) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![License: LGPL v3](https://img.shields.io/badge/License-LGPL_v3-blue.svg)](https://cran.r-project.org/web/licenses/LGPL-3) [![Codecov test coverage](https://codecov.io/gh/rpact-com/rpact/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rpact-com/rpact?branch=main) [![](https://img.shields.io/badge/DOI-10.1007/978--3--031--89669--9-yellow.svg?logo=doi)](https://doi.org/10.1007/978-3-031-89669-9) [![](https://img.shields.io/badge/RPACT-Cloud-blue.svg?logo=r)](https://rpact-cloud.share.connect.posit.cloud) [![](https://img.shields.io/badge/RPACT-Connect-669999.svg?labelColor=336699)](https://rpact-connect.share.connect.posit.cloud) Confirmatory Adaptive Clinical Trial Design, Simulation, and 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 Install the latest CRAN release via ``` r install.packages("rpact") ``` ### Development version To use a feature from the development version, you can install the development version of rpact from [GitHub](https://github.com/rpact-com/rpact). ``` r # install.packages("pak") pak::pak("rpact-com/rpact") ``` ## Documentation The documentation is hosted at [www.rpact.org](https://www.rpact.org) ## Vignettes The vignettes are hosted at [www.rpact.org/vignettes](https://www.rpact.org/vignettes/) ## Issues and Feature Requests Please use GitHub issues to report bugs or suggest improvements for `rpact`. - 🐞 [Report a bug](https://github.com/rpact-com/rpact/issues/new?template=bug_report.yml) Please include a minimal reproducible R example, or a runnable R Markdown (`.Rmd`) or Quarto (`.qmd`) document. - ✨ [Request a feature](https://github.com/rpact-com/rpact/issues/new?template=feature_request.yml) Please describe the use case, affected function(s), and the expected benefit. Before opening a new issue, please [search existing issues](https://github.com/rpact-com/rpact/issues) to avoid duplicates. Please do not include confidential, customer-specific, personal, regulated, or security-sensitive information in public issues. ## RPACT Cloud **RPACT Cloud** is a web-based graphical user interface for `rpact`. It provides guided, browser-based access to selected `rpact` functionality, including study design, sample size calculation, simulation, and reporting, without requiring users to write R code. [rpact.cloud](https://rpact-cloud.share.connect.posit.cloud) ## RPACT Connect Connecting you to insights, downloads, and premium support: [connect.rpact.com](https://rpact-connect.share.connect.posit.cloud) ## The RPACT User Group The *rpact project* has an active user group consisting of decision-makers and users from the pharmaceutical industry and CROs, who meet regularly and, e.g., discuss best practices. We invite you to be part of the *RPACT User Group*: benefit from know-how, shape open source development in Pharma! ## Use on corporate computer systems Please [contact](https://www.rpact.com/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. The validation documentation contains the personal access data for performing the installation qualification with [`testPackage()`](https://docs.rpact.org/reference/testPackage.md). > [www.rpact.com/contact](https://www.rpact.com/contact/) # About - **rpact** is a comprehensive, validated[^1] R package for clinical trial planning, design, simulation, and analysis. It supports classic fixed designs, adaptive group sequential designs, sample size and power calculations, simulation-based operating characteristics, and confirmatory trial analysis with flexible interim decision rules. `rpact` is free of charge and open source, licensed under [LGPL-3](https://cran.r-project.org/web/licenses/LGPL-3), and implements a broad range of methods described in the monograph by [Wassmer and Brannath (2025)](https://doi.org/10.1007%2F978-3-031-89669-9). > For more information, please visit > [www.rpact.org](https://www.rpact.org) - **RPACT** develops **Statistical Tools for Drug Development**. We build and support open-source and commercial software solutions for clinical research, including R packages, Shiny applications, validated workflows, and cloud-based tools for trial planning, simulation, dose finding, analysis, and reporting. RPACT is the team behind tools such as [rpact](https://cran.r-project.org/package=rpact), [crmPack](https://cran.r-project.org/package=crmPack), and [RPACT Cloud](https://rpact-cloud.share.connect.posit.cloud). > For more information please visit > [www.rpact.com](https://www.rpact.com) [^1]: The rpact validation documentation is available exclusively for our customers and supporting members. For more information visit [www.rpact.com/services/sla](https://www.rpact.com/services/service-level-agreement/) # Package index ## All functions - [`as251Normal()`](https://docs.rpact.org/reference/as251Normal.md) : Algorithm AS 251: Normal Distribution - [`as251StudentT()`](https://docs.rpact.org/reference/as251StudentT.md) : Algorithm AS 251: Student T Distribution - [`obtain()`](https://docs.rpact.org/reference/fetch.ParameterSet.md) [`fetch()`](https://docs.rpact.org/reference/fetch.ParameterSet.md) : Extract a single parameter - [`getAccrualTime()`](https://docs.rpact.org/reference/getAccrualTime.md) : Get Accrual Time - [`getAnalysisResults()`](https://docs.rpact.org/reference/getAnalysisResults.md) : Get Analysis Results - [`plotTypes()`](https://docs.rpact.org/reference/getAvailablePlotTypes.md) [`getAvailablePlotTypes()`](https://docs.rpact.org/reference/getAvailablePlotTypes.md) : Get Available Plot Types - [`getClosedCombinationTestResults()`](https://docs.rpact.org/reference/getClosedCombinationTestResults.md) : Get Closed Combination Test Results - [`getClosedConditionalDunnettTestResults()`](https://docs.rpact.org/reference/getClosedConditionalDunnettTestResults.md) : Get Closed Conditional Dunnett Test Results - [`getConditionalPower()`](https://docs.rpact.org/reference/getConditionalPower.md) : Get Conditional Power - [`getConditionalRejectionProbabilities()`](https://docs.rpact.org/reference/getConditionalRejectionProbabilities.md) : Get Conditional Rejection Probabilities - [`getData()`](https://docs.rpact.org/reference/getData.md) [`getData.SimulationResults()`](https://docs.rpact.org/reference/getData.md) : Get Simulation Data - [`getDataset()`](https://docs.rpact.org/reference/getDataset.md) [`getDataSet()`](https://docs.rpact.org/reference/getDataset.md) : Get Dataset - [`getDesignCharacteristics()`](https://docs.rpact.org/reference/getDesignCharacteristics.md) : Get Design Characteristics - [`getDesignConditionalDunnett()`](https://docs.rpact.org/reference/getDesignConditionalDunnett.md) : Get Design Conditional Dunnett Test - [`getDesignFisher()`](https://docs.rpact.org/reference/getDesignFisher.md) : Get Design Fisher - [`getDesignFixed()`](https://docs.rpact.org/reference/getDesignFixed.md) : Get Fixed Design - [`getDesignGroupSequential()`](https://docs.rpact.org/reference/getDesignGroupSequential.md) : Get Design Group Sequential - [`getDesignInverseNormal()`](https://docs.rpact.org/reference/getDesignInverseNormal.md) : Get Design Inverse Normal - [`getDesignSet()`](https://docs.rpact.org/reference/getDesignSet.md) : Get Design Set - [`getEventProbabilities()`](https://docs.rpact.org/reference/getEventProbabilities.md) : Get Event Probabilities - [`getFinalConfidenceInterval()`](https://docs.rpact.org/reference/getFinalConfidenceInterval.md) : Get Final Confidence Interval - [`getFinalPValue()`](https://docs.rpact.org/reference/getFinalPValue.md) : Get Final P Value - [`getFisherInformation()`](https://docs.rpact.org/reference/getFisherInformation.md) : Get Fisher Information From a Design Plan or Simulation Results - [`getFutilityBounds()`](https://docs.rpact.org/reference/getFutilityBounds.md) : Get Futility Bounds - [`getGroupSequentialProbabilities()`](https://docs.rpact.org/reference/getGroupSequentialProbabilities.md) : Get Group Sequential Probabilities - [`getNumberOfSubjects()`](https://docs.rpact.org/reference/getNumberOfSubjects.md) : Get Number Of Subjects - [`rcmd()`](https://docs.rpact.org/reference/getObjectRCode.md) [`getObjectRCode()`](https://docs.rpact.org/reference/getObjectRCode.md) : Get Object R Code - [`getObservedInformationRates()`](https://docs.rpact.org/reference/getObservedInformationRates.md) : Get Observed Information Rates - [`getOutputFormat()`](https://docs.rpact.org/reference/getOutputFormat.md) : Get Output Format - [`getPerformanceScore()`](https://docs.rpact.org/reference/getPerformanceScore.md) : Get Performance Score - [`getPiecewiseSurvivalTime()`](https://docs.rpact.org/reference/getPiecewiseSurvivalTime.md) : Get Piecewise Survival Time - [`getPowerAndAverageSampleNumber()`](https://docs.rpact.org/reference/getPowerAndAverageSampleNumber.md) : Get Power And Average Sample Number - [`getPowerCounts()`](https://docs.rpact.org/reference/getPowerCounts.md) : Get Power Counts - [`getPowerMeans()`](https://docs.rpact.org/reference/getPowerMeans.md) : Get Power Means - [`getPowerRates()`](https://docs.rpact.org/reference/getPowerRates.md) : Get Power Rates - [`getPowerSurvival()`](https://docs.rpact.org/reference/getPowerSurvival.md) : Get Power Survival - [`getRawData()`](https://docs.rpact.org/reference/getRawData.md) : Get Simulation Raw Data for Survival - [`getRepeatedConfidenceIntervals()`](https://docs.rpact.org/reference/getRepeatedConfidenceIntervals.md) : Get Repeated Confidence Intervals - [`getRepeatedPValues()`](https://docs.rpact.org/reference/getRepeatedPValues.md) : Get Repeated P Values - [`getSampleSizeCounts()`](https://docs.rpact.org/reference/getSampleSizeCounts.md) : Get Sample Size Counts - [`getSampleSizeMeans()`](https://docs.rpact.org/reference/getSampleSizeMeans.md) : Get Sample Size Means - [`getSampleSizeRates()`](https://docs.rpact.org/reference/getSampleSizeRates.md) : Get Sample Size Rates - [`getSampleSizeSurvival()`](https://docs.rpact.org/reference/getSampleSizeSurvival.md) : Get Sample Size Survival - [`getSimulationCounts()`](https://docs.rpact.org/reference/getSimulationCounts.md) : Get Simulation Counts - [`getSimulationEnrichmentMeans()`](https://docs.rpact.org/reference/getSimulationEnrichmentMeans.md) : Get Simulation Enrichment Means - [`getSimulationEnrichmentRates()`](https://docs.rpact.org/reference/getSimulationEnrichmentRates.md) : Get Simulation Enrichment Rates - [`getSimulationEnrichmentSurvival()`](https://docs.rpact.org/reference/getSimulationEnrichmentSurvival.md) : Get Simulation Enrichment Survival - [`getSimulationMeans()`](https://docs.rpact.org/reference/getSimulationMeans.md) : Get Simulation Means - [`getSimulationMultiArmMeans()`](https://docs.rpact.org/reference/getSimulationMultiArmMeans.md) : Get Simulation Multi-Arm Means - [`getSimulationMultiArmRates()`](https://docs.rpact.org/reference/getSimulationMultiArmRates.md) : Get Simulation Multi-Arm Rates - [`getSimulationMultiArmSurvival()`](https://docs.rpact.org/reference/getSimulationMultiArmSurvival.md) : Get Simulation Multi-Arm Survival - [`getSimulationRates()`](https://docs.rpact.org/reference/getSimulationRates.md) : Get Simulation Rates - [`getSimulationSurvival()`](https://docs.rpact.org/reference/getSimulationSurvival.md) : Get Simulation Survival - [`getStageResults()`](https://docs.rpact.org/reference/getStageResults.md) : Get Stage Results - [`getTestActions()`](https://docs.rpact.org/reference/getTestActions.md) : Get Test Actions - [`knit_print(`*``*`)`](https://docs.rpact.org/reference/knit_print.SummaryFactory.md) : Print Summary Factory in Markdown Code Chunks - [`mvnprd()`](https://docs.rpact.org/reference/mvnprd.md) : Original Algorithm AS 251: Normal Distribution - [`mvstud()`](https://docs.rpact.org/reference/mvstud.md) : Original Algorithm AS 251: Student T Distribution - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.AnalysisResults.md) : Analysis Results Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.Dataset.md) : Dataset Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.EventProbabilities.md) : Event Probabilities Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.NumberOfSubjects.md) : Number Of Subjects Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.ParameterSet.md) : Parameter Set Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.SimulationResults.md) : Simulation Results Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.StageResults.md) : Stage Results Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.SummaryFactory.md) : Summary Factory Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.TrialDesign.md) [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.TrialDesign.md) : Trial Design Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.TrialDesignPlan.md) : Trial Design Plan Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.TrialDesignSet.md) : Trial Design Set Plotting - [`plot(`*``*`)`](https://docs.rpact.org/reference/plot.TrialDesignSummaries.md) : Plot Trial Design Summaries - [`print(`*``*`)`](https://docs.rpact.org/reference/print.SummaryFactory.md) : Summary Factory Printing - [`print(`*``*`)`](https://docs.rpact.org/reference/print.TrialDesignCharacteristics.md) : Trial Design Characteristics Printing - [`print(`*``*`)`](https://docs.rpact.org/reference/print.TrialDesignSummaries.md) : Print Trial Design Summaries - [`readDataset()`](https://docs.rpact.org/reference/readDataset.md) : Read Dataset - [`readDatasets()`](https://docs.rpact.org/reference/readDatasets.md) : Read Multiple Datasets - [`rpact-package`](https://docs.rpact.org/reference/rpact.md) [`rpact`](https://docs.rpact.org/reference/rpact.md) : rpact - Confirmatory Adaptive Clinical Trial Design and Analysis - [`setOutputFormat()`](https://docs.rpact.org/reference/setOutputFormat.md) : Set Output Format - [`testPackage()`](https://docs.rpact.org/reference/testPackage.md) : Test and Validate the rpact Package Installation - [`getPiecewiseExponentialDistribution()`](https://docs.rpact.org/reference/utilitiesForPiecewiseExponentialDistribution.md) [`ppwexp()`](https://docs.rpact.org/reference/utilitiesForPiecewiseExponentialDistribution.md) [`getPiecewiseExponentialQuantile()`](https://docs.rpact.org/reference/utilitiesForPiecewiseExponentialDistribution.md) [`qpwexp()`](https://docs.rpact.org/reference/utilitiesForPiecewiseExponentialDistribution.md) [`getPiecewiseExponentialRandomNumbers()`](https://docs.rpact.org/reference/utilitiesForPiecewiseExponentialDistribution.md) [`rpwexp()`](https://docs.rpact.org/reference/utilitiesForPiecewiseExponentialDistribution.md) : The Piecewise Exponential Distribution - [`writeDataset()`](https://docs.rpact.org/reference/writeDataset.md) : Write Dataset - [`writeDatasets()`](https://docs.rpact.org/reference/writeDatasets.md) : Write Multiple Datasets # Articles ### All vignettes - [Getting started with rpact](https://docs.rpact.org/articles/rpact_getting_started.md):