Skip to content

Commit

Permalink
Merge pull request #13 from rpact-com/dev/3.5.0
Browse files Browse the repository at this point in the history
New CRAN release version 3.5.0
  • Loading branch information
fpahlke authored Jan 25, 2024
2 parents 690554a + 59af0db commit d210810
Show file tree
Hide file tree
Showing 197 changed files with 49,860 additions and 36,298 deletions.
8 changes: 8 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ lastMiKTeXException
^_pkgdown\.yml$
^pkgdown$
^rpact-tests$
^tests-complete$
testthat-problems\.rds
^\.covrignore$
^tests-complete$
^.*\.gcda$
^.*\.gcno$
^inst/\.covrignore$
^README\.html$
9 changes: 9 additions & 0 deletions .covrignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
R/pkgname.R
R/class_core_plot_settings.R
R/f_quality_assurance.R
R/f_core_plot.R
R/class_design_plan.R
R/class_event_probabilities.R
R/class_simulation_results.R
R/f_assertions.cpp
src/f_utilities.h
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ lastMiKTeXException
/.project
docs
rpact-tests
tests-complete
testthat-problems.rds
/tests/testthat/_examples
/src/*.gcno
/src/*.gcda
/README.html
25 changes: 19 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rpact
Title: Confirmatory Adaptive Clinical Trial Design and Analysis
Version: 3.4.0
Date: 2023-07-03
Version: 3.5.0
Date: 2024-01-25
Authors@R: c(
person(
given = "Gernot",
Expand All @@ -28,6 +28,13 @@ Authors@R: c(
family = "Schueuerhuis",
email = "[email protected]",
role = c("ctb")
),
person(
given = "Tobias",
family = "Muetze",
email = "[email protected]",
comment = c(ORCID = "0000-0002-4111-1941"),
role = c("ctb")
))
Description: 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) <doi:10.1007/978-3-319-32562-0>. This includes classical group sequential as well as multi-stage adaptive hypotheses tests that are based on the combination testing principle.
License: LGPL-3
Expand All @@ -54,10 +61,9 @@ LinkingTo: Rcpp
Suggests:
ggplot2 (>= 2.2.0),
testthat (>= 3.0.0),
mnormt (>= 1.5-7),
rmarkdown (>= 1.10)
VignetteBuilder: knitr, rmarkdown
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
Config/testthat/parallel: true
Expand All @@ -79,9 +85,9 @@ Collate:
'class_analysis_dataset.R'
'class_analysis_stage_results.R'
'class_analysis_results.R'
'f_design_general_utilities.R'
'class_time.R'
'class_design_set.R'
'f_design_utilities.R'
'class_design_plan.R'
'class_design_power_and_asn.R'
'class_event_probabilities.R'
Expand All @@ -102,10 +108,16 @@ Collate:
'f_analysis_multiarm_means.R'
'f_analysis_multiarm_rates.R'
'f_analysis_multiarm_survival.R'
'f_as251.R'
'f_core_output_formats.R'
'f_design_fisher_combination_test.R'
'f_design_group_sequential.R'
'f_design_sample_size_calculator.R'
'f_design_plan_count_data.R'
'f_design_plan_means.R'
'f_design_plan_plot.R'
'f_design_plan_rates.R'
'f_design_plan_survival.R'
'f_design_plan_utilities.R'
'f_quality_assurance.R'
'f_simulation_base_means.R'
'f_simulation_base_rates.R'
Expand All @@ -119,5 +131,6 @@ Collate:
'f_simulation_multiarm_rates.R'
'f_simulation_multiarm_survival.R'
'f_simulation_performance_score.R'
'f_simulation_plot.R'
'parameter_descriptions.R'
'pkgname.R'
9 changes: 8 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ S3method(as.data.frame,TrialDesignPlan)
S3method(as.data.frame,TrialDesignSet)
S3method(as.matrix,FieldSet)
S3method(knit_print,ParameterSet)
S3method(knit_print,SummaryFactory)
S3method(length,TrialDesignSet)
S3method(names,AnalysisResults)
S3method(names,FieldSet)
Expand Down Expand Up @@ -38,6 +39,8 @@ S3method(summary,AnalysisResults)
S3method(summary,Dataset)
S3method(summary,ParameterSet)
S3method(summary,TrialDesignSet)
export(as251Normal)
export(as251StudentT)
export(getAccrualTime)
export(getAnalysisResults)
export(getAvailablePlotTypes)
Expand Down Expand Up @@ -82,12 +85,14 @@ export(getPiecewiseExponentialRandomNumbers)
export(getPiecewiseSurvivalTime)
export(getPlotSettings)
export(getPowerAndAverageSampleNumber)
export(getPowerCounts)
export(getPowerMeans)
export(getPowerRates)
export(getPowerSurvival)
export(getRawData)
export(getRepeatedConfidenceIntervals)
export(getRepeatedPValues)
export(getSampleSizeCounts)
export(getSampleSizeMeans)
export(getSampleSizeRates)
export(getSampleSizeSurvival)
Expand All @@ -105,6 +110,8 @@ export(getTestActions)
export(getWideFormat)
export(kable)
export(kable.ParameterSet)
export(mvnprd)
export(mvstud)
export(plotTypes)
export(ppwexp)
export(printCitation)
Expand Down Expand Up @@ -132,4 +139,4 @@ importFrom(knitr,kable)
importFrom(knitr,knit_print)
importFrom(methods,new)
importFrom(rlang,.data)
useDynLib(rpact, .registration = TRUE)
useDynLib(rpact,.registration = TRUE)
16 changes: 16 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@

# rpact 3.5.0

## New features

* The new functions `getSampleSizeCounts()` and `getPowerCounts()` can be used to perform sample size calculations and the assessment of test characteristics for clinical trials with negative binomial distributed count data. This is possible for fixed sample size and group sequential designs. For the latter, the methodology described in Muetze et al. (2019) is implemented. These functions can also be used to perform blinded sample size reassessments according to Friede and Schmidli (2010).

## Improvements, issues, and changes

* Original Fortran 77 code of AS 251 included into the package, see functions `mvnprd`, `mvstud`, `as251Normal`, and `as251StudentT`
* R package `mnormt` dependency has been removed
* Argument `theta` can be used for plotting of sample size and power results
* Pipe operator usage improved
* Shiny app link changed to https://rpact.shinyapps.io/cloud
* Several minor improvements


# rpact 3.4.0

## New features
Expand Down
44 changes: 28 additions & 16 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,67 +1,79 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

getFisherCombinationSizeCpp <- function(kMax, alpha0Vec, criticalValues, tVec, cases) {
.mvnprd <- function(a, b, bpd, eps, inf, ierc, hinc) {
.Call(`_rpact_mvnprd`, a, b, bpd, eps, inf, ierc, hinc)
}

.mvstud <- function(ndf, a, b, bpd, d, eps, inf, ierc, hnc) {
.Call(`_rpact_mvstud`, ndf, a, b, bpd, d, eps, inf, ierc, hnc)
}

.getNegativeBinomialEstimates <- function(counts1, counts2, t1, t2) {
.Call(`_rpact_estimate_nb`, counts1, counts2, t1, t2)
}

.getFisherCombinationSizeCpp <- function(kMax, alpha0Vec, criticalValues, tVec, cases) {
.Call(`_rpact_getFisherCombinationSizeCpp`, kMax, alpha0Vec, criticalValues, tVec, cases)
}

getSimulatedAlphaCpp <- function(kMax, alpha0, criticalValues, tVec, iterations) {
.getSimulatedAlphaCpp <- function(kMax, alpha0, criticalValues, tVec, iterations) {
.Call(`_rpact_getSimulatedAlphaCpp`, kMax, alpha0, criticalValues, tVec, iterations)
}

getFisherCombinationCasesCpp <- function(kMax, tVec) {
.getFisherCombinationCases <- function(kMax, tVec) {
.Call(`_rpact_getFisherCombinationCasesCpp`, kMax, tVec)
}

getDesignFisherTryCpp <- function(kMax, alpha, tolerance, criticalValues, scale, alpha0Vec, userAlphaSpending, method) {
.getDesignFisherInner <- function(kMax, alpha, tolerance, criticalValues, scale, alpha0Vec, userAlphaSpending, method) {
.Call(`_rpact_getDesignFisherTryCpp`, kMax, alpha, tolerance, criticalValues, scale, alpha0Vec, userAlphaSpending, method)
}

getGroupSequentialProbabilitiesCpp <- function(decisionMatrix, informationRates) {
.getGroupSequentialProbabilitiesCpp <- function(decisionMatrix, informationRates) {
.Call(`_rpact_getGroupSequentialProbabilitiesCpp`, decisionMatrix, informationRates)
}

getDesignGroupSequentialPampallonaTsiatisCpp <- function(tolerance, beta, alpha, kMax, deltaPT0, deltaPT1, informationRates, sided, bindingFutility) {
.getDesignGroupSequentialPampallonaTsiatisCpp <- function(tolerance, beta, alpha, kMax, deltaPT0, deltaPT1, informationRates, sided, bindingFutility) {
.Call(`_rpact_getDesignGroupSequentialPampallonaTsiatisCpp`, tolerance, beta, alpha, kMax, deltaPT0, deltaPT1, informationRates, sided, bindingFutility)
}

getDesignGroupSequentialUserDefinedAlphaSpendingCpp <- function(kMax, userAlphaSpending, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.getDesignGroupSequentialUserDefinedAlphaSpendingCpp <- function(kMax, userAlphaSpending, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.Call(`_rpact_getDesignGroupSequentialUserDefinedAlphaSpendingCpp`, kMax, userAlphaSpending, sided, informationRates, bindingFutility, futilityBounds, tolerance)
}

getDesignGroupSequentialAlphaSpendingCpp <- function(kMax, alpha, gammaA, typeOfDesign, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.getDesignGroupSequentialAlphaSpendingCpp <- function(kMax, alpha, gammaA, typeOfDesign, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.Call(`_rpact_getDesignGroupSequentialAlphaSpendingCpp`, kMax, alpha, gammaA, typeOfDesign, sided, informationRates, bindingFutility, futilityBounds, tolerance)
}

getDesignGroupSequentialDeltaWTCpp <- function(kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance, deltaWT) {
.getDesignGroupSequentialDeltaWTCpp <- function(kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance, deltaWT) {
.Call(`_rpact_getDesignGroupSequentialDeltaWTCpp`, kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance, deltaWT)
}

getDesignGroupSequentialPocockCpp <- function(kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.getDesignGroupSequentialPocockCpp <- function(kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.Call(`_rpact_getDesignGroupSequentialPocockCpp`, kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance)
}

getDesignGroupSequentialOBrienAndFlemingCpp <- function(kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.getDesignGroupSequentialOBrienAndFlemingCpp <- function(kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance) {
.Call(`_rpact_getDesignGroupSequentialOBrienAndFlemingCpp`, kMax, alpha, sided, informationRates, bindingFutility, futilityBounds, tolerance)
}

getDesignGroupSequentialBetaSpendingCpp <- function(criticalValues, kMax, userAlphaSpending, userBetaSpending, informationRates, bindingFutility, tolerance, typeOfDesign, typeBetaSpending, gammaA, gammaB, alpha, beta, sided, betaAdjustment, twoSidedPower) {
.getDesignGroupSequentialBetaSpendingCpp <- function(criticalValues, kMax, userAlphaSpending, userBetaSpending, informationRates, bindingFutility, tolerance, typeOfDesign, typeBetaSpending, gammaA, gammaB, alpha, beta, sided, betaAdjustment, twoSidedPower) {
.Call(`_rpact_getDesignGroupSequentialBetaSpendingCpp`, criticalValues, kMax, userAlphaSpending, userBetaSpending, informationRates, bindingFutility, tolerance, typeOfDesign, typeBetaSpending, gammaA, gammaB, alpha, beta, sided, betaAdjustment, twoSidedPower)
}

getDesignGroupSequentialUserDefinedBetaSpendingCpp <- function(criticalValues, kMax, userAlphaSpending, userBetaSpending, sided, informationRates, bindingFutility, tolerance, typeOfDesign, gammaA, alpha, betaAdjustment, twoSidedPower) {
.getDesignGroupSequentialUserDefinedBetaSpendingCpp <- function(criticalValues, kMax, userAlphaSpending, userBetaSpending, sided, informationRates, bindingFutility, tolerance, typeOfDesign, gammaA, alpha, betaAdjustment, twoSidedPower) {
.Call(`_rpact_getDesignGroupSequentialUserDefinedBetaSpendingCpp`, criticalValues, kMax, userAlphaSpending, userBetaSpending, sided, informationRates, bindingFutility, tolerance, typeOfDesign, gammaA, alpha, betaAdjustment, twoSidedPower)
}

getSimulationMeansLoopCpp <- function(alternative, kMax, maxNumberOfIterations, designNumber, informationRates, futilityBounds, alpha0Vec, criticalValues, meanRatio, thetaH0, stDev, groups, normalApproximation, plannedSubjects, directionUpper, allocationRatioPlanned, minNumberOfSubjectsPerStage, maxNumberOfSubjectsPerStage, conditionalPower, thetaH1, stDevH1, calcSubjectsFunctionType, calcSubjectsFunctionR, calcSubjectsFunctionCpp) {
.getSimulationMeansLoopCpp <- function(alternative, kMax, maxNumberOfIterations, designNumber, informationRates, futilityBounds, alpha0Vec, criticalValues, meanRatio, thetaH0, stDev, groups, normalApproximation, plannedSubjects, directionUpper, allocationRatioPlanned, minNumberOfSubjectsPerStage, maxNumberOfSubjectsPerStage, conditionalPower, thetaH1, stDevH1, calcSubjectsFunctionType, calcSubjectsFunctionR, calcSubjectsFunctionCpp) {
.Call(`_rpact_getSimulationMeansLoopCpp`, alternative, kMax, maxNumberOfIterations, designNumber, informationRates, futilityBounds, alpha0Vec, criticalValues, meanRatio, thetaH0, stDev, groups, normalApproximation, plannedSubjects, directionUpper, allocationRatioPlanned, minNumberOfSubjectsPerStage, maxNumberOfSubjectsPerStage, conditionalPower, thetaH1, stDevH1, calcSubjectsFunctionType, calcSubjectsFunctionR, calcSubjectsFunctionCpp)
}

getSimulationRatesCpp <- function(kMax, informationRates, criticalValues, pi1, pi2, maxNumberOfIterations, designNumber, groups, futilityBounds, alpha0Vec, minNumberOfSubjectsPerStage, maxNumberOfSubjectsPerStage, conditionalPower, pi1H1, pi2H1, normalApproximation, plannedSubjects, directionUpper, allocationRatioPlanned, riskRatio, thetaH0, calcSubjectsFunctionType, calcSubjectsFunctionR, calcSubjectsFunctionCpp) {
.getSimulationRatesCpp <- function(kMax, informationRates, criticalValues, pi1, pi2, maxNumberOfIterations, designNumber, groups, futilityBounds, alpha0Vec, minNumberOfSubjectsPerStage, maxNumberOfSubjectsPerStage, conditionalPower, pi1H1, pi2H1, normalApproximation, plannedSubjects, directionUpper, allocationRatioPlanned, riskRatio, thetaH0, calcSubjectsFunctionType, calcSubjectsFunctionR, calcSubjectsFunctionCpp) {
.Call(`_rpact_getSimulationRatesCpp`, kMax, informationRates, criticalValues, pi1, pi2, maxNumberOfIterations, designNumber, groups, futilityBounds, alpha0Vec, minNumberOfSubjectsPerStage, maxNumberOfSubjectsPerStage, conditionalPower, pi1H1, pi2H1, normalApproximation, plannedSubjects, directionUpper, allocationRatioPlanned, riskRatio, thetaH0, calcSubjectsFunctionType, calcSubjectsFunctionR, calcSubjectsFunctionCpp)
}

getSimulationSurvivalCpp <- function(designNumber, kMax, sided, criticalValues, informationRates, conditionalPower, plannedEvents, thetaH1, minNumberOfEventsPerStage, maxNumberOfEventsPerStage, directionUpper, allocationRatioPlanned, accrualTime, treatmentGroup, thetaH0, futilityBounds, alpha0Vec, pi1Vec, pi2, eventTime, piecewiseSurvivalTime, cdfValues1, cdfValues2, lambdaVec1, lambdaVec2, phi, maxNumberOfSubjects, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, kappa, calcEventsFunctionType, calcEventsFunctionR, calcEventsFunctionCpp) {
.getSimulationSurvivalCpp <- function(designNumber, kMax, sided, criticalValues, informationRates, conditionalPower, plannedEvents, thetaH1, minNumberOfEventsPerStage, maxNumberOfEventsPerStage, directionUpper, allocationRatioPlanned, accrualTime, treatmentGroup, thetaH0, futilityBounds, alpha0Vec, pi1Vec, pi2, eventTime, piecewiseSurvivalTime, cdfValues1, cdfValues2, lambdaVec1, lambdaVec2, phi, maxNumberOfSubjects, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, kappa, calcEventsFunctionType, calcEventsFunctionR, calcEventsFunctionCpp) {
.Call(`_rpact_getSimulationSurvivalCpp`, designNumber, kMax, sided, criticalValues, informationRates, conditionalPower, plannedEvents, thetaH1, minNumberOfEventsPerStage, maxNumberOfEventsPerStage, directionUpper, allocationRatioPlanned, accrualTime, treatmentGroup, thetaH0, futilityBounds, alpha0Vec, pi1Vec, pi2, eventTime, piecewiseSurvivalTime, cdfValues1, cdfValues2, lambdaVec1, lambdaVec2, phi, maxNumberOfSubjects, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, kappa, calcEventsFunctionType, calcEventsFunctionR, calcEventsFunctionCpp)
}

Expand Down
6 changes: 3 additions & 3 deletions R/class_analysis_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 7139 $
## | Last changed: $Date: 2023-06-28 08:15:31 +0200 (Mi, 28 Jun 2023) $
## | File version: $Revision: 7554 $
## | Last changed: $Date: 2024-01-12 10:19:05 +0100 (Fr, 12 Jan 2024) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -107,7 +107,7 @@ C_KEY_WORDS <- c(
#' @param fileEncoding character string: if non-empty declares the encoding used on a file
#' (not a connection) so the character data can be re-encoded.
#' See the 'Encoding' section of the help for file, the 'R Data Import/Export Manual' and 'Note'.
#' @param ... Further arguments to be passed to code{\link[utils]{read.table}}.
#' @param ... Further arguments to be passed to \code{\link[utils]{read.table}}.
#'
#' @details
#' \code{readDataset} is a wrapper function that uses \code{\link[utils]{read.table}} to read the
Expand Down
9 changes: 4 additions & 5 deletions R/class_analysis_stage_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 7126 $
## | Last changed: $Date: 2023-06-23 14:26:39 +0200 (Fr, 23 Jun 2023) $
## | File version: $Revision: 7554 $
## | Last changed: $Date: 2024-01-12 10:19:05 +0100 (Fr, 12 Jan 2024) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -966,8 +966,7 @@ StageResultsMultiArmSurvival <- setRefClass("StageResultsMultiArmSurvival",
directionUpper = "logical"
),
methods = list(
initialize = function(design, dataInput, ...,
normalApproximation = FALSE) {
initialize = function(design, dataInput, ...) {
callSuper(.design = design, .dataInput = dataInput, ...)
init(design = design, dataInput = dataInput)

Expand Down Expand Up @@ -1653,7 +1652,7 @@ plot.StageResults <- function(x, y, ..., type = 1L,
p <- p + ggplot2::geom_errorbar(
data = data,
ggplot2::aes(ymin = .data[["lower"]], ymax = .data[["upper"]]),
width = 0.15, position = pd, size = 0.8
width = 0.15, position = pd, linewidth = 0.8
)
p <- p + ggplot2::geom_line(position = pd, linetype = "longdash")
p <- p + ggplot2::geom_point(position = pd, size = 2.0)
Expand Down
Loading

0 comments on commit d210810

Please sign in to comment.