| name | vera-data-nominal-generating |
| description | Server-side extension that completes the full analysis pipeline for nominal (unordered multi-class) outcome variables after vera-data-nominal-reviewing has run. Adds remaining association tests (Chi-square/Fisher's for categorical, ANOVA/Kruskal-Wallis for continuous predictors, pairwise class comparisons), subgroup analysis with interaction tests, full modeling (multinomial logistic regression with RRR, LDA, CART, Random Forest, LightGBM multi-class), confusion matrices, unified variable importance (0-100), and cross-method insight synthesis. Generates manuscript-ready methods.md and results.md with formatted tables, publication-quality figures, and references.bib. Applies output variation and code style variation for natural, non-repetitive output. Triggered after vera-data-nominal-reviewing completes and its PART 0–2 artifacts are present (see ../../../../CROSS-SKILL- INTERFACE.md). |
| allowed-tools | Read, Bash, Write, Edit, Grep, Glob |
Nominal Outcome — Full Analysis & Manuscript Generation
Table of Contents
Open-source skill. Read reference/specs/output-variation-protocol.md
before every generation — apply all variation layers.
Workflow
Continues from where vera-data-nominal-reviewing stopped (PART 0-2 done).
| Step | Responsibility | Executor | Document | Input | Output |
|---|
| Additional tests | Run Additional Tests | Main Agent | workflow/step04-run-additional-tests.md | Prior step output | PART 3 code + prose |
| Subgroup | Analyze Subgroups | Main Agent | workflow/step05-analyze-subgroups.md | Prior step output | PART 4 code + prose |
| Modeling | Fit Models | Main Agent | workflow/step06-fit-models.md | Prior step output | PART 5 code + prose |
| Comparison | Compare Models | Main Agent | workflow/step07-compare-models.md | Prior step output | PART 6 code + prose |
| Manuscript | Generate Manuscript | Main Agent | workflow/step08-generate-manuscript.md | Prior step output | methods.md + results.md |
Additional Inputs
Collect if not already provided:
- Target discipline (for reporting conventions)
- Target journal or style (APA 7th, STROBE, etc.)
- Research question / hypothesis
- Subgroup variable (if subgroup analysis desired)
- Reference category for multinomial logistic regression
Output Structure
output/
├── methods.md
├── results.md
├── tables/ ← Markdown + CSV per table
├── figures/ ← PNGs, 300 DPI
├── references.bib
├── code.R ← Style-varied
└── code.py ← Style-varied
Key References (read before generation)
| File | Purpose |
|---|
reference/specs/output-variation-protocol.md | Output quality variation layers |
reference/specs/code-style-variation.md | Seven-dimension code style diversity |
reference/patterns/sentence-bank.md | 4-6 phrasings per result type |
reference/rules/reporting-standards.md | Hard rules for statistical reporting |
Reporting Standards
Same as vera-data-nominal-reviewing, plus:
- RRR: "RRR = X.XX, 95% CI [X.XX, X.XX]" — relative to stated reference category
- Always state which category is the reference for multinomial logistic
- Confusion matrix: report overall accuracy + per-class precision/recall (in-sample caveat if N small)
- LDA: report discriminant function loadings, Wilks' lambda, canonical correlations
- Chi-square: report observed vs expected, Cramer's V with interpretation
- Coefficients: class-specific log-odds with SE; convert to RRR for interpretation
- Tree-based with small N: frame as "exploratory"; never claim predictive validity
Multinomial-Logit Assumption: IIA
Multinomial logistic regression assumes Independence of Irrelevant Alternatives (IIA) — the relative odds of choosing category A vs B should not change when category C is added to or removed from the choice set. IIA is often violated when alternatives are close substitutes (e.g., "bus" vs "metro" in a transport-mode study).
- Test IIA with the Hausman–McFadden test (
mlogit::hmftest in R; manual implementation in Python). Report χ², df, p.
- If IIA is violated (p < .05) or theoretically implausible, report the violation and consider: nested logit (ordered substitutability), multinomial probit (no IIA), or a generalized estimating equations approach. Do NOT silently proceed.
- Document explicitly in Methods: "We assessed IIA using the Hausman–McFadden test. [Result.]"
- The tree-based / LDA analyses in Path A do NOT make the IIA assumption and serve as a robustness check when IIA is suspect.
Cross-Skill Interface
Method Unit Contract:
├── code_r → .R script (style-varied)
├── code_python → .py script (style-varied)
├── methods_md → methods.md (varied structure)
├── results_md → results.md (varied phrasing)
├── tables/ → Markdown + CSV
├── figures/ → PNGs 300 DPI (varied layout)
├── references_bib → .bib with cited references
└── comparison → cross-method narrative (in results.md)
Invoked directly after vera-data-nominal-reviewing or orchestrated by vera-data-application-pipelining.