Skip to content

Allow fixing the static choice lapse (p_lapse) to a scalar - #4

Closed
Gilles86 wants to merge 1 commit into
mainfrom
feature/fixable-p-lapse
Closed

Gilles86 wants to merge 1 commit into
mainfrom
feature/fixable-p-lapse

Conversation

@Gilles86

Copy link
Copy Markdown
Contributor

Mirrors the SSM p_outlier API on the static-choice LapseModel: p_lapse can be a fixed float (lapse on but not sampled) in addition to the default None (hierarchical per-subject rate).

Why: on hard geometries (e.g. full-prior risk estimation) a free hierarchical lapse funnels/diverges; this lets you keep a small lapse without that cost — the choice-model analog of the RT models' fixed p_outlier=0.05. Default None preserves existing behaviour; no default change.

Note (re: design): base choice models (RiskModel/RiskRegressionModel) still have no lapse by default — the lapse remains the explicit opt-in LapseModel, and the on-by-default contaminant stays an SSM (DDM/RDM) thing. This PR only makes the opt-in lapse fixable.

🤖 Generated with Claude Code

Mirror the DDM/RDM RTLapseMixin p_outlier API on the static-choice LapseModel:
p_lapse can be a fixed float (lapse on but NOT sampled) in addition to the
default None (hierarchical per-subject rate). Lets hard prior-estimation
geometries keep a lapse without a second funnel, and -- as for the RT models'
contaminant -- lets you assume a small lapse rather than estimate a weakly
identified rate. Default None preserves existing behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Gilles86

Copy link
Copy Markdown
Contributor Author

Superseded by the 0.6.1 release PR (re-applied on the current LapseModel, which has changed since June: Beta lapse group prior, regression-aware spec). Same API: model.p_lapse = <float> fixes the lapse; None stays hierarchical. Added validation and a test that the fixed value enters the likelihood.

@Gilles86

Copy link
Copy Markdown
Contributor Author

Included in 0.6.1 via #9.

@Gilles86 Gilles86 closed this Nov 14, 2026
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