-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from rpact-com/dev/4.1.1
Enhancement #65 and other improvements
- Loading branch information
Showing
53 changed files
with
958 additions
and
709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
## | | ||
## | Contact us for information about our services: [email protected] | ||
## | | ||
## | File version: $Revision: 8274 $ | ||
## | Last changed: $Date: 2024-09-26 11:33:59 +0200 (Do, 26 Sep 2024) $ | ||
## | File version: $Revision: 8416 $ | ||
## | Last changed: $Date: 2024-11-18 16:13:44 +0100 (Mo, 18 Nov 2024) $ | ||
## | Last changed by: $Author: pahlke $ | ||
## | | ||
|
||
|
@@ -285,6 +285,9 @@ ParameterSet <- R6::R6Class("ParameterSet", | |
isUndefinedParameter = function(parameterName) { | ||
return(self$.getParameterType(parameterName) == C_PARAM_TYPE_UNKNOWN) | ||
}, | ||
isNotApplicableParameter = function(parameterName) { | ||
return(self$.getParameterType(parameterName) == C_PARAM_NOT_APPLICABLE) | ||
}, | ||
.getInputParameters = function() { | ||
params <- self$.getParametersOfOneGroup(c(C_PARAM_USER_DEFINED, C_PARAM_DEFAULT_VALUE)) | ||
return(params) | ||
|
@@ -1323,7 +1326,7 @@ ParameterSet <- R6::R6Class("ParameterSet", | |
parametersToIgnore <- intersect(parametersToIgnore, parameterNames) | ||
} | ||
|
||
if (parameterSet$.getParameterType("hazardRatio") == C_PARAM_GENERATED && | ||
if (parameterSet$isGeneratedParameter("hazardRatio") && | ||
!is.null(parameterSet[[".piecewiseSurvivalTime"]]) && | ||
isTRUE(parameterSet$.piecewiseSurvivalTime$piecewiseSurvivalEnabled)) { | ||
parametersToIgnore <- c(parametersToIgnore, "hazardRatio") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
## | | ||
## | Contact us for information about our services: [email protected] | ||
## | | ||
## | File version: $Revision: 8180 $ | ||
## | Last changed: $Date: 2024-09-06 10:13:14 +0200 (Fr, 06 Sep 2024) $ | ||
## | File version: $Revision: 8416 $ | ||
## | Last changed: $Date: 2024-11-18 16:13:44 +0100 (Mo, 18 Nov 2024) $ | ||
## | Last changed by: $Author: pahlke $ | ||
## | | ||
|
||
|
@@ -736,7 +736,7 @@ TrialDesignInverseNormal <- R6::R6Class("TrialDesignInverseNormal", | |
informationRatesTemp, self$informationRates | ||
)) | ||
} | ||
if (self$.getParameterType("futilityBounds") != C_PARAM_GENERATED && | ||
if (!self$isGeneratedParameter("futilityBounds") && | ||
(!grepl("^as.*", typeOfDesign) || typeBetaSpending == C_TYPE_OF_DESIGN_BS_NONE) && | ||
!identical(futilityBoundsTemp, self$futilityBounds)) { | ||
return(self$.pasteComparisonResult( | ||
|
@@ -953,10 +953,14 @@ TrialDesignConditionalDunnett <- R6::R6Class("TrialDesignConditionalDunnett", | |
informationAtInterim = NULL, | ||
secondStageConditioning = NULL, | ||
sided = NULL, | ||
initialize = function(..., informationAtInterim = NULL, secondStageConditioning = NULL) { | ||
initialize = function(..., | ||
informationAtInterim = NULL, | ||
secondStageConditioning = NULL, | ||
directionUpper = NA) { | ||
super$initialize(...) | ||
self$informationAtInterim <- informationAtInterim | ||
self$secondStageConditioning <- secondStageConditioning | ||
self$directionUpper <- directionUpper | ||
notApplicableParameters <- c( | ||
"kMax", | ||
"stages", | ||
|
@@ -1009,6 +1013,8 @@ TrialDesignConditionalDunnett <- R6::R6Class("TrialDesignConditionalDunnett", | |
#' If \code{secondStageConditioning = FALSE} is specified, the unconditional adjusted p-values are used, otherwise | ||
#' conditional adjusted p-values are calculated, default is \code{secondStageConditioning = TRUE} | ||
#' (for details, see Koenig et al., 2008). | ||
#' @inheritParams param_directionUpper | ||
#' @inheritParams param_three_dots | ||
#' | ||
#' @details | ||
#' For performing the conditional Dunnett test the design must be defined through this function. | ||
|
@@ -1025,16 +1031,25 @@ TrialDesignConditionalDunnett <- R6::R6Class("TrialDesignConditionalDunnett", | |
#' | ||
#' @export | ||
#' | ||
getDesignConditionalDunnett <- function(alpha = 0.025, # C_ALPHA_DEFAULT | ||
informationAtInterim = 0.5, secondStageConditioning = TRUE) { | ||
getDesignConditionalDunnett <- function( | ||
alpha = 0.025, # C_ALPHA_DEFAULT | ||
informationAtInterim = 0.5, | ||
..., | ||
secondStageConditioning = TRUE, | ||
directionUpper = NA) { | ||
.assertIsValidAlpha(alpha) | ||
.assertIsSingleNumber(informationAtInterim, "informationAtInterim") | ||
.assertIsInOpenInterval(informationAtInterim, "informationAtInterim", 0, 1) | ||
return(TrialDesignConditionalDunnett$new( | ||
.assertIsSingleLogical(directionUpper, "directionUpper", naAllowed = TRUE) | ||
design <- TrialDesignConditionalDunnett$new( | ||
alpha = alpha, | ||
informationAtInterim = informationAtInterim, | ||
secondStageConditioning = secondStageConditioning | ||
)) | ||
secondStageConditioning = secondStageConditioning, | ||
directionUpper = directionUpper | ||
) | ||
design$.setParameterType("directionUpper", ifelse(!is.na(directionUpper), | ||
C_PARAM_USER_DEFINED, C_PARAM_NOT_APPLICABLE)) | ||
return(design) | ||
} | ||
|
||
#' | ||
|
Oops, something went wrong.