Skip to content

Commit

Permalink
Argument doseLevels added to simulation multiarm
Browse files Browse the repository at this point in the history
  • Loading branch information
fpahlke committed Nov 6, 2024
1 parent 05ff5c8 commit 5e93ab8
Show file tree
Hide file tree
Showing 16 changed files with 555 additions and 310 deletions.
4 changes: 2 additions & 2 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: 4.1.0.9265
Date: 2024-10-16
Version: 4.1.0.9266
Date: 2024-11-06
Authors@R: c(
person(
given = "Gernot",
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# rpact 4.1.1

## New features

* For the functions `getSimulationMultiArmMeans()`, `getSimulationMultiArmRates()`, and `getSimulationMultiArmSurvival()` it is now possible to specify a parameter `doseLevels` to define the dose levels for a `linear` or `sigmoidEmax` dose-response relationship (see feature request [#63](https://github.com/rpact-com/rpact/issues/63)).

## Improvements, issues, and changes

* Minor improvements and


# rpact 4.1.0

Expand Down
63 changes: 49 additions & 14 deletions R/class_analysis_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: info@rpact.com
## |
## | File version: $Revision: 8180 $
## | Last changed: $Date: 2024-09-06 10:13:14 +0200 (Fr, 06 Sep 2024) $
## | File version: $Revision: 8360 $
## | Last changed: $Date: 2024-11-04 15:40:23 +0100 (Mo, 04 Nov 2024) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -1942,9 +1942,22 @@ plot.AnalysisResults <- function(x, y, ...,
return(.createPlotResultObject(plotList, grid))
}

.plotAnalysisResultsRCI <- function(...,
x, y, nPlanned, allocationRatioPlanned, main, xlab, ylab,
legendTitle, palette, legendPosition, showSource, analysisResultsName, plotSettings = NULL) {
.plotAnalysisResultsRCI <- function(
...,
x,
y,
nPlanned,
allocationRatioPlanned,
main,
xlab,
ylab,
legendTitle,
palette,
legendPosition,
showSource,
analysisResultsName,
plotSettings = NULL) {

.assertIsAnalysisResults(x)
.warnInCaseOfUnknownArguments(functionName = "plot", ignore = c("treatmentArms", "populations"), ...)

Expand Down Expand Up @@ -2103,10 +2116,24 @@ plot.AnalysisResults <- function(x, y, ...,
return(result)
}

.plotAnalysisResults <- function(...,
x, y, type, nPlanned, allocationRatioPlanned, main, xlab, ylab,
legendTitle, palette, legendPosition, showSource, functionCall,
analysisResultsName, plotSettings = NULL) {
.plotAnalysisResults <- function(
...,
x,
y,
type,
nPlanned,
allocationRatioPlanned,
main,
xlab,
ylab,
legendTitle,
palette,
legendPosition,
showSource,
functionCall,
analysisResultsName,
plotSettings = NULL) {

.assertIsSingleInteger(type, "type", naAllowed = FALSE, validateType = FALSE)
if (!(type %in% c(1, 2))) {
stop(C_EXCEPTION_TYPE_ILLEGAL_ARGUMENT, "'type' (", type, ") is not allowed; must be 1 or 2")
Expand All @@ -2117,12 +2144,20 @@ plot.AnalysisResults <- function(x, y, ...,

if (type == 2) {
return(.plotAnalysisResultsRCI(
x = x, y = y, nPlanned = nPlanned, allocationRatioPlanned = allocationRatioPlanned,
main = main, xlab = xlab, ylab = ylab,
legendTitle = legendTitle, palette = palette,
legendPosition = legendPosition, showSource = showSource,
x = x,
y = y,
nPlanned = nPlanned,
allocationRatioPlanned = allocationRatioPlanned,
main = main,
xlab = xlab,
ylab = ylab,
legendTitle = legendTitle,
palette = palette,
legendPosition = legendPosition,
showSource = showSource,
analysisResultsName = analysisResultsName,
plotSettings = plotSettings, ...
plotSettings = plotSettings,
...
))
}

Expand Down
7 changes: 5 additions & 2 deletions R/class_simulation_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: info@rpact.com
## |
## | File version: $Revision: 8323 $
## | Last changed: $Date: 2024-10-15 09:20:06 +0200 (Tue, 15 Oct 2024) $
## | File version: $Revision: 8361 $
## | Last changed: $Date: 2024-11-04 16:27:39 +0100 (Mo, 04 Nov 2024) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -774,6 +774,7 @@ SimulationResultsMultiArmMeans <- R6::R6Class("SimulationResultsMultiArmMeans",
muMaxVector = NULL,
gED50 = NULL,
slope = NULL,
doseLevels = NULL,
intersectionTest = NULL,
adaptations = NULL,
typeOfSelection = NULL,
Expand Down Expand Up @@ -1018,6 +1019,7 @@ SimulationResultsMultiArmRates <- R6::R6Class("SimulationResultsMultiArmRates",
piControlH1 = NULL,
gED50 = NULL,
slope = NULL,
doseLevels = NULL,
intersectionTest = NULL,
adaptations = NULL,
typeOfSelection = NULL,
Expand Down Expand Up @@ -1310,6 +1312,7 @@ SimulationResultsMultiArmSurvival <- R6::R6Class("SimulationResultsMultiArmSurvi
omegaMaxVector = NULL,
gED50 = NULL,
slope = NULL,
doseLevels = NULL,
intersectionTest = NULL,
adaptations = NULL,
typeOfSelection = NULL,
Expand Down
Loading

0 comments on commit 5e93ab8

Please sign in to comment.