Skip to content

Fix K-correction bug and 14 data entry errors#7

Open
Khetnen wants to merge 1 commit intonucular:masterfrom
Khetnen:fix-scoring-and-data-errors
Open

Fix K-correction bug and 14 data entry errors#7
Khetnen wants to merge 1 commit intonucular:masterfrom
Khetnen:fix-scoring-and-data-errors

Conversation

@Khetnen
Copy link
Copy Markdown

@Khetnen Khetnen commented Apr 4, 2026

Summary

  • K-correction bug: calculateTScore uses this.scores["K"] (the K T-score) but standard MMPI-2 K-correction uses the K raw score. The T-score arrays are sized for K-raw-corrected indices -- using K T-scores produces inflated values that silently clamp to 120.
  • 11 T-score typos in scales.json: truncated digits, concatenated values, transposed digits, dropped leading digits. All identified via monotonicity checks and verified against published norms.
  • 3 item assignment errors in scales.json: D1 had q223 in both true and false lists (should be q233 in true), Es had q325 (should be q323), GF had q475 (should be q473). Verified against Graham (1993) appendices.

See commit message for per-fix details.

K-correction bug (report.js):
  calculateTScore used this.scores["K"] (the K T-score) for
  K-correction, but standard MMPI-2 scoring uses the K raw score.
  The T-score tables are indexed by K-raw-corrected values -- using
  K T-scores produces inflated indices that clamp to 120 for most
  moderate-to-high score combinations.

T-score data fixes (scales.json):
  Mf male: 666 -> 66 (extra digit in +2 stride)
  PK female: 87389 -> 87,89 (two values concatenated; array was 1 short)
  NEGE female: 81384 -> 81,84 (same concatenation issue)
  Sc male: 4 -> 41 (truncated digit; matches female Sc pattern)
  AAS female: 7 -> 73 (truncated digit; fits repeating 5,6,6 diff cycle)
  Pt male: 93 -> 83 (typo; +2 stride: 79,81,83,85)
  Ma male: 59 -> 69 (copy error from nearby value; single digit typo)
  Sc4 female: 40 -> 70 (truncated leading 7; +5 stride)
  Mt male: 30 -> 90, 31 -> 91 (leading 9 dropped from both)
  ASP female: 42 -> 52 (best fit interpolation, verified against manual)
  A female: 76 -> 78 (preserves +1,+1,+1,+2 cycle, verified against manual)

Item assignment fixes (scales.json):
  D1: [223,true] -> [233,true] (q223 is non-depressive when true;
    single digit typo, q233 already in parent D scale as true;
    verified against Graham 1993 Appendix C)
  Es: [325,true] -> [323,true] (verified against Graham 1993 Appendix J)
  GF: [475,true] -> [473,true] (verified against Graham 1993 Appendix J)

Co-Authored-By: Claude Opus 4.6 (1M context) <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