Skip to content

Add WLE (Weighted Likelihood Estimation) as ability estimator#53

Open
ben-domingue wants to merge 1 commit into
yeatmanlab:mainfrom
ben-domingue:feature/wle-estimation
Open

Add WLE (Weighted Likelihood Estimation) as ability estimator#53
ben-domingue wants to merge 1 commit into
yeatmanlab:mainfrom
ben-domingue:feature/wle-estimation

Conversation

@ben-domingue

Copy link
Copy Markdown

Summary

  • Adds 'WLE' (Warm 1989 Weighted Likelihood Estimation) as a third option for the method parameter alongside 'MLE' and 'EAP'
  • Implemented via the same Powell optimizer as MLE; the objective maximizes L(θ) + 0.5·ln I(θ), matching mirt's fscores(method="WLE") formulation
  • WLE is bias-corrected relative to MLE and produces finite estimates even for extreme response patterns on short tests

Changes

  • src/cat.ts: estimateAbilityWLE() and negWLEObjective() methods; 'wle' added to validateMethod(); JSDoc updated
  • src/__tests__/cat.test.ts: 3 new tests (analytic anchor, bias-correction property, bounds/SE)
  • README.md: WLE usage example added; new CAT(...)new Cat(...) typo fixed
  • validation/: new wle-simulation.js script, WLE section in jsCAT-validation.Rmd, and validation plot (jsCAT_validation_3.png) showing jsCAT WLE vs mirt WLE on a 50-item Rasch simulation

Known pre-existing issue (not introduced by this PR)

stopping.test.ts fails to run with a syntax error in jest-extended/pretty-format due to a Node version incompatibility (optional chaining ?. requires Node ≥ 14). This failure exists on main before this PR and is unrelated to the WLE changes.

Test plan

  • npm test -- --testPathPattern=cat.test — all 87 tests pass
  • Build library: npm run build
  • Run WLE validation: Rscript /tmp/wle_validation.R — points lie on the diagonal vs mirt

🤖 Generated with Claude Code

Implements Warm (1989) bias-corrected MLE via the same Powell optimizer
used by MLE. The WLE objective maximizes L(θ) + 0.5·ln I(θ), matching
the formulation in mirt's fscores(method="WLE"). Validated against mirt
on a 50-item Rasch simulation — estimates lie on the diagonal across the
full theta range.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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