psytools 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/SOURCES.md +13 -0
- package/dist/cjs/inventories/aq10.js +1 -0
- package/dist/cjs/inventories/asrs6.js +1 -0
- package/dist/cjs/inventories/audit.js +1 -0
- package/dist/cjs/inventories/dass21.js +1 -0
- package/dist/cjs/inventories/gad7.js +1 -0
- package/dist/cjs/inventories/mini-ipip.js +1 -0
- package/dist/cjs/inventories/phq9.js +1 -0
- package/dist/cjs/inventories/who5.js +1 -0
- package/dist/esm/inventories/aq10.js +1 -0
- package/dist/esm/inventories/asrs6.js +1 -0
- package/dist/esm/inventories/audit.js +1 -0
- package/dist/esm/inventories/dass21.js +1 -0
- package/dist/esm/inventories/gad7.js +1 -0
- package/dist/esm/inventories/mini-ipip.js +1 -0
- package/dist/esm/inventories/phq9.js +1 -0
- package/dist/esm/inventories/who5.js +1 -0
- package/package.json +1 -1
- package/src/inventories/aq10.ts +1 -0
- package/src/inventories/asrs6.ts +1 -0
- package/src/inventories/audit.ts +1 -0
- package/src/inventories/dass21.ts +1 -0
- package/src/inventories/gad7.ts +1 -0
- package/src/inventories/mini-ipip.ts +1 -0
- package/src/inventories/phq9.ts +1 -0
- package/src/inventories/who5.ts +1 -0
package/README.md
CHANGED
|
@@ -183,6 +183,8 @@ scoring: {
|
|
|
183
183
|
|
|
184
184
|
`ignore` sums what is answered (partial totals understate severity — use deliberately); `prorate` scales the raw score up to the full item count (rounded) and refuses to score below `minAnswered`; `require-complete` throws unless every contributing non-optional item is answered. For subscale scoring the policy applies to each subscale independently.
|
|
185
185
|
|
|
186
|
+
The bundled inventories ship with policies (PHQ-9/GAD-7/DASS-21/Mini-IPIP prorate with thresholds, WHO-5/ASRS/AQ-10 require-complete, AUDIT ignores to match its skip logic) — see [SOURCES.md](SOURCES.md#missing-data-policies) for the rationale and how to override.
|
|
187
|
+
|
|
186
188
|
## Custom evaluation
|
|
187
189
|
|
|
188
190
|
Declarative scoring is optional. Pass an evaluator for anything beyond sums and subscales — it can return a single scale, multiple scales, a category, or arbitrary data:
|
package/SOURCES.md
CHANGED
|
@@ -28,6 +28,19 @@ Official validated translations exist for most of these instruments, but they we
|
|
|
28
28
|
|
|
29
29
|
Non-English texts live as one file per inventory per language under [`src/locales/<locale>/`](src/locales) — exactly the unit a native-speaker reviewer needs. Verification contributions are very welcome.
|
|
30
30
|
|
|
31
|
+
## Missing-data policies
|
|
32
|
+
|
|
33
|
+
Bundled inventories ship with declarative missing-data policies (`scoring.missing`). **The prorating thresholds are implementation choices reflecting common research practice — they are not part of the instruments' official scoring rules.** Override by cloning the definition if your protocol differs.
|
|
34
|
+
|
|
35
|
+
| Inventory | Policy | Rationale |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `phq9` | prorate, ≥7 of 9 answered | Common research practice (≈75% completion) |
|
|
38
|
+
| `gad7` | prorate, ≥6 of 7 answered | Common research practice |
|
|
39
|
+
| `dass21` | prorate, ≥6 of 7 per subscale | DASS manual tolerates occasional missing items |
|
|
40
|
+
| `mini-ipip` | prorate, ≥3 of 4 per trait | IPIP scoring is mean-based; prorating is equivalent |
|
|
41
|
+
| `who5`, `asrs6`, `aq10` | require-complete | Short instruments; cutoffs/counts are undefined for partial data |
|
|
42
|
+
| `audit` | ignore | Unanswered items score 0, matching the instrument's skip logic (e.g. non-drinkers skipping items 2–8) |
|
|
43
|
+
|
|
31
44
|
## PHQ-9 — Patient Health Questionnaire-9 (`phq9`)
|
|
32
45
|
|
|
33
46
|
**License: Free.** Developed with an educational grant from Pfizer Inc. The copyright holders state that no permission is required to reproduce, translate, display, or distribute the PHQ screeners. Official repository: <https://www.phqscreeners.com>.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psytools",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Zero-dependency toolkit for psychological assessments: data models, response validation, scoring, and predefined inventories (PHQ-9, GAD-7, DASS-21, WHO-5, ASRS, AQ-10, AUDIT, Mini-IPIP) in multiple languages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"psychology",
|
package/src/inventories/aq10.ts
CHANGED
package/src/inventories/asrs6.ts
CHANGED
package/src/inventories/audit.ts
CHANGED
package/src/inventories/gad7.ts
CHANGED
package/src/inventories/phq9.ts
CHANGED