Fix K-correction bug and 14 data entry errors#7
Open
Khetnen wants to merge 1 commit intonucular:masterfrom
Open
Fix K-correction bug and 14 data entry errors#7Khetnen wants to merge 1 commit intonucular:masterfrom
Khetnen wants to merge 1 commit intonucular:masterfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
calculateTScoreusesthis.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.scales.json: truncated digits, concatenated values, transposed digits, dropped leading digits. All identified via monotonicity checks and verified against published norms.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.