rpact-com / rpact

rpact: Confirmatory Adaptive Clinical Trial Design and Analysis
https://rpact-com.github.io/rpact/
23 stars 5 forks source link

Incorrect legend when plotting designs with/without binding futility #11

Closed TimHesterberg closed 10 months ago

TimHesterberg commented 10 months ago
# Compare nonbinding and binding futility bounds
design1 <- getDesignGroupSequential(
  kMax = 4, alpha = 0.05,
  sided = 1,
  informationRates = 1:4/4,
  typeOfDesign = "asOF",
  typeBetaSpending = "bsOF")

design2 <- getDesignGroupSequential(
  kMax = 4, alpha = 0.05,
  sided = 1,
  informationRates = 1:4/4,
  typeOfDesign = "asOF",
  typeBetaSpending = "bsOF",
  bindingFutility = TRUE)

plot(getDesignSet(designs = c(design1, design2),
                  variedParameters = "bindingFutility"))
# The final legend line is:
# TRUE, Futility bound (non-binding)
# The TRUE indicates that futility is binding.
# The "(non-binding)" is incorrect.

# In contrast
plot(design2)
# has the second line in the legend "Futility bound (binding)"
fpahlke commented 10 months ago

Hi Tim!

Many thanks for providing this issue. We have fixed it in the source code and the solution will be available in the next release of rpact on CRAN (planned for end of January 2024).

Happy holidays and best regards, Friedrich