Skip to content

Parametric and frailty fits sort the count last, as canonical_rows (#777, canonical order) - #783

Merged
derrynknife merged 1 commit into
developfrom
claude/surpyval-next-steps-7uatqe
Oct 9, 2026
Merged

derrynknife merged 1 commit into
developfrom
claude/surpyval-next-steps-7uatqe

Conversation

@derrynknife

Copy link
Copy Markdown
Owner

Part of #777.

canonical_order (the row order of every parametric regression, #728)
sorted by time, censoring, count, truncation and covariates. canonical_rows
(the semi-parametric fits', #772) puts the count last, so that counted
data sort as their rows expanded one per unit do. The orders now agree:
the count is canonical_order's last key, and grouped_data (the frailty
fits', which follows canonical_order) puts it after the group.

Only rows tied in time, censoring and truncation, with different counts,
change places, so only the order of the likelihood's sums moves. On 84
fits of data with such ties (WeibullPH/AFT/PO, ExponentialPH,
LogNormalAFT, WeibullFrailty, CoxFrailty, 12 seeds) every verdict is the
same and the answers move at rounding: coefficients by up to 1e-13, a
CoxFrailty theta by 2e-7 (its search tolerance), a theta at 0 from 5e-21
to 1e-16. The row-order tests (#744, #757, #772), the bootstrap tests,
the doctests of the regression package and the executed cells of the two
regression guides are unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TRhKL2fJBiAAfNo9rihwts


Generated by Claude Code

, canonical order)

canonical_order (the row order of every parametric regression, #728)
sorted by time, censoring, count, truncation and covariates. canonical_rows
(the semi-parametric fits', #772) puts the count last, so that counted
data sort as their rows expanded one per unit do. The orders now agree:
the count is canonical_order's last key, and grouped_data (the frailty
fits', which follows canonical_order) puts it after the group.

Only rows tied in time, censoring and truncation, with different counts,
change places, so only the order of the likelihood's sums moves. On 84
fits of data with such ties (WeibullPH/AFT/PO, ExponentialPH,
LogNormalAFT, WeibullFrailty, CoxFrailty, 12 seeds) every verdict is the
same and the answers move at rounding: coefficients by up to 1e-13, a
CoxFrailty theta by 2e-7 (its search tolerance), a theta at 0 from 5e-21
to 1e-16. The row-order tests (#744, #757, #772), the bootstrap tests,
the doctests of the regression package and the executed cells of the two
regression guides are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TRhKL2fJBiAAfNo9rihwts
@derrynknife
derrynknife merged commit e44d3f7 into develop Oct 9, 2026
5 checks passed
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.

2 participants