Missing updated bounds from `sim_gs_n()` changed from `Inf` to `NA` with latest {gsDesign2}
@jdblischak がすでに取り組んでいます。
2026年9月28日 から。
評価
この issue はまだ評価されていません。
説明
Two {simtrial} tests failed the weekly integration test:
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-unvalidated-sim_gs_n.R:755:3'): sim_gs_n() can update bounds even when some are missing ──
Expected `observed$updated_upper_bound` to equal `c(Inf, 2.46416041021134, 1.99094670148633)`.
Differences:
`actual`: NA 2.464160410 1.990946701
`expected`: Inf 2.464160410 1.990946701
── Failure ('test-unvalidated-sim_gs_n.R:759:3'): sim_gs_n() can update bounds even when some are missing ──
Expected `observed$updated_lower_bound` to equal `c(-2.72847356838699, -Inf, -Inf)`.
Differences:
`actual`: -2.728473568 NA NA
`expected`: -2.728473568 -Inf -Inf
[ FAIL 2 | WARN 1 | SKIP 3 | PASS 270 ]
I was able to narrow it down to the recent update to gsDesign2::gs_update_ahr() (https://github.com/Merck/gsDesign2/pull/676)
With the latest development version of {gsDesign2} (https://github.com/Merck/gsDesign2/commit/e4f7ae6aec1af252771c1351aee53f01e29bca70), the missing updated bounds are reported as NA.
library("gsDesign")
library("gsDesign2")
library("simtrial")
# futility - IA1; efficacy - IA2 & FA
x <- gs_design_ahr(
alpha = 0.025,
beta = 0.1,
analysis_time = 1:3*12,
upper = gsDesign2::gs_spending_bound,
upar = list(sf = sfLDOF, total_spend = 0.025),
test_upper = c(FALSE, TRUE, TRUE),
lower = gs_spending_bound,
lpar = list(sf = sfHSD, param = -4, total_spend = 0.01),
test_lower = c(TRUE, FALSE, FALSE)
) |> to_integer()
set.seed(1)
observed <- sim_gs_n(
n_sim = 1,
sample_size = max(x$analysis$n),
enroll_rate = x$enroll_rate,
fail_rate = x$fail_rate,
test = wlr,
weight = fh(rho = 0, gamma = 0),
cut = list(ia1 = create_cut(planned_calendar_time = x$analysis$time[1]),
ia2 = create_cut(planned_calendar_time = x$analysis$time[2]),
fa = create_cut(planned_calendar_time = x$analysis$time[3])),
original_design = x
)
observed
observed[, 13:16]
## planned_lower_bound planned_upper_bound updated_lower_bound updated_upper_bound
## 1 -2.319759 NA -2.728474 NA
## 2 NA 2.358356 NA 2.464160
## 3 NA 2.009328 NA 1.990947
Building {gsDesign2} from the previous commit (https://github.com/Merck/gsDesign2/commit/aac76407433f156e44cea798d26b0015088678d9), the missing updated bounds are reported as -Inf or Inf.
library("gsDesign")
library("gsDesign2")
library("simtrial")
# futility - IA1; efficacy - IA2 & FA
x <- gs_design_ahr(
alpha = 0.025,
beta = 0.1,
analysis_time = 1:3*12,
upper = gsDesign2::gs_spending_bound,
upar = list(sf = sfLDOF, total_spend = 0.025),
test_upper = c(FALSE, TRUE, TRUE),
lower = gs_spending_bound,
lpar = list(sf = sfHSD, param = -4, total_spend = 0.01),
test_lower = c(TRUE, FALSE, FALSE)
) |> to_integer()
set.seed(1)
observed <- sim_gs_n(
n_sim = 1,
sample_size = max(x$analysis$n),
enroll_rate = x$enroll_rate,
fail_rate = x$fail_rate,
test = wlr,
weight = fh(rho = 0, gamma = 0),
cut = list(ia1 = create_cut(planned_calendar_time = x$analysis$time[1]),
ia2 = create_cut(planned_calendar_time = x$analysis$time[2]),
fa = create_cut(planned_calendar_time = x$analysis$time[3])),
original_design = x
)
observed
observed[, 13:16]
## planned_lower_bound planned_upper_bound updated_lower_bound updated_upper_bound
## 1 -2.319759 NA -2.728474 Inf
## 2 NA 2.358356 -Inf 2.464160
## 3 NA 2.009328 -Inf 1.990947
Which is the desired behavior going forward?
xref: #335
- 主要言語
- R
- スター
- 41
- フォーク
- 14
- 平均マージ
- 3時間 4分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Merck/simtrial のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
Add spending time to `sim_gs_n`再び着手できるかも @LittleBeannie が 464 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
waldronlab/bedbaser#27 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
`latest` pre-release missing: Package run deleted it, then `gh release create` failed with HTTP 403オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
DESEQ2_NORM ignores sizefactors_from_controls, causing inconsistent normalization対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nf-core/differentialabundance#770 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信