Skip to content

ltriangle robustness: finite starting values, bounded-support tests, docs - #183

Merged
joethorley merged 2 commits into
add-triangle-distributionfrom
joethorley/ltriangle-robustness
Jul 14, 2026
Merged

ltriangle robustness: finite starting values, bounded-support tests, docs#183
joethorley merged 2 commits into
add-triangle-distributionfrom
joethorley/ltriangle-robustness

Conversation

@joethorley

Copy link
Copy Markdown
Member

Follow-up to #169 (targets the add-triangle-distribution branch).

Addresses the non-behavior-changing review items from the #169 review:

  • sltriangle() starting values. When the data have no spread on the log scale (e.g. all concentrations equal), max(abs(logx - location)) is 0 and log_scalelog became -Inf. It now falls back to a small positive half-width so the starting value stays finite. Fits on data with spread are unchanged.
  • Bounded-support tests. Because the triangular has finite support, added tests that ssd_hc() and predict() return finite, monotonic estimates across the full 1-99% range.
  • Docs. The distributions vignette now notes that ltriangle is experimental and not part of the default BCANZ set (ssd_dists_bcanz()), so it is only fitted when explicitly requested.

No change to fitted results for normal data, so no fit-value snapshots change.

The relative-density-floor change (the statistical item from the review) is handled separately in a companion PR so the likelihood change and its snapshot updates can be reviewed on their own.

🤖 Generated with Claude Code

joethorley and others added 2 commits July 14, 2026 12:38
…nded-support tests and docs

Follow-up to #169.

- sltriangle() falls back to a small positive half-width when the data have
  no spread on the log scale, avoiding a -Inf starting value.
- Add tests that ssd_hc()/predict() are finite and monotonic across the full
  1-99% range for the bounded-support distribution.
- Note in the distributions vignette that ltriangle is experimental and not
  part of the default BCANZ set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joethorley
joethorley merged commit e4ab438 into add-triangle-distribution Jul 14, 2026
@joethorley
joethorley deleted the joethorley/ltriangle-robustness branch July 14, 2026 22:17
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.

1 participant