Skip to content

Commit c0d35df

Browse files
committed
fix(minimisation): correct unequal allocation ratio handling; bump version to 1.0.2 and update references (NEWS, apiVersion, tests, vignette)
1 parent e38b8eb commit c0d35df

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: unbiased
22
Title: Unbiased: Production-Grade Randomization API
3-
Version: 1.0.1
3+
Version: 1.0.2
44
Authors@R: c(
55
person("Kamil", "Sijko", , "kamil.sijko@ttsi.com.pl",
66
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2203-1065")),

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# unbiased 1.0.2
2+
3+
## Bug Fixes
4+
5+
- Fixed incorrect ratio allocation in minimisation randomization when unequal allocation ratios were provided. This was caused by a logic bug; updating a single line in `randomize-minimisation-pocock.R` restores expected allocation behavior.
6+
17
# unbiased 1.0.1
28

39
## Bug Fixes

R/randomize-minimisation-pocock.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ randomize_minimisation_pocock <-
253253
# compute scenario where each arm (x) gets new subject
254254
dplyr::mutate(dplyr::across(
255255
dplyr::where(is.numeric),
256-
~ dplyr::if_else(arm == x, .x + 1, .x) *
256+
~ dplyr::if_else(arm == x, .x + 1, .x) /
257257
ratio[arm]
258258
)) |>
259259
# compute dispersion across each covariate

inst/plumber/unbiased_api/plumber.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#* url = "https://ttscience.github.io/unbiased/")
1111
#* @apiLicense list(name = "MIT",
1212
#* url = "https://github.com/ttscience/unbiased/LICENSE.md")
13-
#* @apiVersion 1.0.1
13+
#* @apiVersion 1.0.2
1414
#* @apiTag initialize Endpoints that initialize study with chosen
1515
#* randomization method and parameters.
1616
#* @apiTag randomize Endpoints that randomize individual patients after the

tests/testthat/test-error-handling.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ testthat::test_that("uses correct environment variables when setting up sentry",
44
SENTRY_DSN = "https://sentry.io/123",
55
GITHUB_SHA = "abc",
66
SENTRY_ENVIRONMENT = "production",
7-
SENTRY_RELEASE = "1.0.1"
7+
SENTRY_RELEASE = "1.0.2"
88
)
99
)
1010

@@ -18,7 +18,7 @@ testthat::test_that("uses correct environment variables when setting up sentry",
1818
testthat::expect_equal(app_name, "unbiased")
1919
testthat::expect_equal(app_version, "abc")
2020
testthat::expect_equal(environment, "production")
21-
testthat::expect_equal(release, "1.0.1")
21+
testthat::expect_equal(release, "1.0.2")
2222
},
2323
.package = "sentryR",
2424
)

vignettes/articles/references.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,6 @@ @Manual{unbiased
217217
title = {unbiased: Diverse Randomization Algorithms for Clinical Trials},
218218
author = {Kamil Sijko and Kinga Sałata and Aleksandra Duda and Łukasz Wałejko},
219219
year = {2024},
220-
note = {R package version 1.0.1},
220+
note = {R package version 1.0.2},
221221
url = {https://ttscience.github.io/unbiased/},
222222
}

0 commit comments

Comments
 (0)