univariate-multivariable-cox-regression
Use when running prognostic survival analysis on a clinical cohort with time-to-event data to estimate univariate and multivariable Cox proportional hazards models, export result tables, and generate forest plots. NOT for: nomogram construction, calibration curves, time-dependent ROC analysis, or model training/feature selection beyond the built-in univariate screening rule.
Veto GatesRequired pass for any deployment consideration
| Dimension | Result | Detail |
|---|---|---|
| Scientific Integrity | PASS | No fabricated statistics; Cox PH models use standard survival package; HR tables export computed values only; three canonical references cited |
| Practice Boundaries | PASS | No diagnostic conclusions; skill is scoped to HR table and forest plot generation; When Not to Use section explicitly excludes clinical decision tools |
| Methodological Ground | PASS | Univariate screening with p<0.05 threshold then multivariable model is standard practice; fallback to all features if fewer than 3 significant is appropriate and documented; no causal claims made |
| Code Usability | PASS | Script syntax valid; set.seed(options$seed) present; modular 8-file structure; dependency check fires with named packages; no logic errors detected in code review |
Core Capability92 / 100 — 8 Categories
Medical TaskExecution Average: 82.4 / 100 — Assertions: 23/25 Passed
openxlsx and survival packages missing; --help renders correctly; SKILL_PACKAGE_NOT_FOUND fires correctly naming packages; set.seed confirmed
Subcommand routing confirmed; forestplot package dependency check fires; required plot table columns documented
skip_univariate argument documented; event-count threshold documented; fallback logic documented; runtime verification blocked by missing packages
Timeout and seed arguments confirmed; overwrite flag documented; canonical references present; output file list comprehensive
SKILL_MISSING_COLUMNS and SKILL_INVALID_PARAMETER documented; time column validation requirements confirmed; runtime blocked by missing packages
Key Strengths
- Three-subcommand architecture (analyze, forest-plot, multi-forest-plot) cleanly separates analysis from visualization
- Automated smoke test script (run_smoke_test.R) and shell wrapper enable easy regression testing
- set.seed() present with configurable --seed argument ensuring full reproducibility
- Multivariable fallback logic (use all features if fewer than 3 significant) is explicitly documented
- When Not to Use section precisely excludes nomograms, calibration, and time-dependent ROC, preventing misuse