This analysis compares observed relationship survival and annual separation
hazards with predictions from the tenure-only baseline and the full
baseline-plus-MQ model. It reads the full-training disaggregated regression
data; it does not fit or refit a model.
flowchart LR
data[(Full-training disaggregated<br/>regression data)]
metadata[(Regression metadata<br/>hazard coefficient)]
summarize[[Filter in-sample rows<br/>through 2024; aggregate by tenure]]
curves[(Observed and predicted<br/>survival and annual hazards)]
plots[/Two PDF figures/]
summary[/hazard_plots_summary.csv/]
data --> summarize
metadata --> summarize
summarize --> curves
curves --> plots
curves --> summary
classDef input fill:#eee5f5,stroke:#76528c,stroke-width:2px
classDef code fill:#f3f3f3,stroke:#666,stroke-width:2px
classDef support fill:#fff0cc,stroke:#a66b00,stroke-width:2px
classDef output fill:#e2f2e7,stroke:#3b7a4b,stroke-width:2px
class data,metadata input
class summarize code
class curves support
class plots,summary output
/data/<coverage>/analyses/full_training/disaggregated_regression_data/; needs is_in_sample, calendar_year, tenure_year, hazard_label, hazard_prob, hazard_baseline_prob, and match_score
Regression-data metadata
_metadata.yaml beside the Parquet shards; supplies the trained positive model_metrics.hazard_beta
Build
Component
Location
Analysis module
analyses/modules/hazard_plots.R
Rscript entry point
analyses/pipelines/hazard_plots.R
Runtime
hct-tower-analyses-cpu
Slurm entry point
slurm/analyses/hazard_plots.slurm
Slurm task
hazard-plots
Output
Output
File / location
Contents
Survivor function
hazard_survivor_function.pdf in /artifacts/<coverage>/analyses/hazard_plots/
Observed discrete Kaplan–Meier survival, tenure-only baseline survival, and baseline-plus-MQ survival
Annual hazard by tenure
hazard_by_tenure.pdf in /artifacts/<coverage>/analyses/hazard_plots/
Observed separation rate and mean predicted hazards by tenure year
Plot summary
hazard_plots_summary.csv in the same directory
Mean MQ, mean predicted hazard, realized separation rate, and predicted hazards at tenure years 1, 5, and 10 for average MQ
The analysis uses full-training in-sample person-periods across all user shards
by default and retains calendar years through 2024. The plots use the same
tenure-specific observations for all three series. Tenure is zero-indexed in
the data, so the first interval is displayed as year 1. The full-sample outputs
used by the paper are written directly to
/artifacts/full/analyses/hazard_plots/.
Command reference
For the paper figures, use the full-sample Slurm command below from the
repository root on the cluster. The direct command is an alternative for
an interactive run inside hct-tower-analyses-cpu. Do not run both at the
same time because they write to the same output directory.
Option
Required / default
Effect
--config PATH
config/config_full.yaml
Selects the analyses YAML config and its full-training input/output paths.
--shards ID[,ID,…]
Unset
Limits the run to the selected user shards and writes under shards/user_<ids>/. Omit for all shards.
For a shard-specific check, add --shards 00,01 to either command. That run
writes to a separate shard-scoped directory and does not replace the
full-sample figures used by the paper.