Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ jobs:
if: github.event_name == 'pull_request'
name: Spell Check 🆎
uses: insightsengineering/r.pkg.template/.github/workflows/spelling.yaml@main
links:
if: github.event_name == 'pull_request'
name: Check URLs 🌐
uses: insightsengineering/r.pkg.template/.github/workflows/links.yaml@main
vbump:
name: Version Bump 🤜🤛
if: github.event_name == 'push'
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: RobinCar2
Title: ROBust INference for Covariate Adjustment in Randomized Clinical Trials
Version: 0.2.3.9000
Date: 2026-07-04
Version: 0.2.4
Date: 2026-08-19
Authors@R:
c(
person("Liming", "Li", , "liming.li1@astrazeneca.com", role = c("aut", "cre"), comment = c(ORCID = "0009-0008-6870-0878")),
Expand Down Expand Up @@ -53,4 +53,4 @@ Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
Config/roxygen2/version: 8.0.0
Config/roxygen2/version: 8.1.0
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RobinCar2 0.2.3.9000
# RobinCar2 0.2.4

### New Features

Expand All @@ -8,6 +8,10 @@

* Previously `robin_surv()` gave small numerical differences to `survival::coxph()` for the hazard ratio estimate. This is now fixed.

### Misc

* Adapted a unit test to a change in `stats::model.frame.glm()` in `R-devel`, which now enforces the factor levels recorded in the model fit, consistent with `stats::model.frame.lm()`. As a consequence, `predict_counterfactual()` requires the factor levels of the treatment variable in `data` to match those of `fit`. Previously, mismatched levels were silently accepted for `glm` fits; this restriction has always applied to `lm` fits.

# RobinCar2 0.2.3

### Bug Fixes
Expand Down
2 changes: 0 additions & 2 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Zhang
Zhao
al
andomized
arXiv
asab
asaf
biomet
Expand Down Expand Up @@ -88,7 +87,6 @@ pbo
plc
preprint
trt
unadjusted
unstratified
ust
vcovG
Expand Down
8 changes: 5 additions & 3 deletions tests/testthat/test-predict_counterfactual.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ test_that("confint method for prediction_cf works as expected", {


test_that("predict_counterfactual works for treatment factor levels in non-alphabetical order", {
relabel_dat <- glm_data
levels(relabel_dat$treatment)[1] <- "trtpbo"

fit_glm_relabel <- glm(y ~ treatment * s1 + covar, data = relabel_dat)
expected_result <- predict_counterfactual(fit_glm, treatment ~ 1)

relabel_dat <- find_data(fit_glm)
levels(relabel_dat$treatment)[1] <- "trtpbo"
result_relabel <- predict_counterfactual(fit_glm, treatment ~ 1, data = relabel_dat)
result_relabel <- predict_counterfactual(fit_glm_relabel, treatment ~ 1, data = relabel_dat)

expected <- expected_result$estimate
names(expected)[1] <- "trtpbo"
Expand Down
Loading