Skip to content

Export public critical_count (#243) - #244

Merged
jc-macdonald merged 2 commits into
mainfrom
feat/critical-count-243
Nov 11, 2026
Merged

jc-macdonald merged 2 commits into
mainfrom
feat/critical-count-243

Conversation

@jc-macdonald

Copy link
Copy Markdown
Collaborator

Closes #243.

Adds critical_count(total_events, *, rho, margin, confidence): the largest treatment-arm event count at which the exact conditional-binomial success rule holds, or -1. It wraps the existing cached _critical helper (no behaviour change) and validates its arguments. Exported in __all__, listed on the trials API page, changelog entry added.

Tests: boundary consistency with efficacy_interval (success at the count, failure one above), agreement with conditional_power, the -1 case, argument validation; doctest values checked.

Checks run locally: just ci (lint, strict mypy, 1167 tests, 95% coverage, figures check) and mkdocs build --strict.

@jc-macdonald
jc-macdonald merged commit c369441 into main Nov 11, 2026
11 checks passed
@jc-macdonald
jc-macdonald deleted the feat/critical-count-243 branch November 14, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export a public critical_count for the exact fixed-sample success rule

1 participant