Build a release packet that separates exact events, interval observations and early censoring before interpreting hazard ratios or six-day predictions.
Project: review a support-resolution survival model
Fix the case-level contract
Define case creation as time zero and resolution as the event. Record one case ID, pre-creation priority flag, observed end age, event flag, cancellation status, and status-timestamp precision. Keep inspection bounds for cases whose resolution was discovered only at periodic checks. Do not merge these into exact timestamps to make one uniform table. Interval observations require their own path, and cancellation needs its own outcome policy.
Verify relative-risk fitting
On an exact-time, no-ties teaching ledger, reproduce a one-covariate Cox partial-likelihood grid and exponentiate its coefficient for a priority-versus-standard hazard ratio. Check event-time risk sets, censor removal, and coefficient sign. Then use an established fitter for the production model, with its tie method and uncertainty settings recorded. A hazard ratio is a conditional instantaneous-rate comparison, not a direct estimate of saved staff time. The fitting lesson sets that boundary.
Inspect model form and action relevance
Plot group unresolved curves with risk counts and inspect event-time residuals for a changing priority effect. Do not treat one p-value as a complete diagnostic. If the relative effect varies meaningfully with elapsed age, prefer a prespecified six-day restricted-mean contrast or a model designed for time-varying effects. Record whether priority was genuinely known at creation; any later assignment needs a different exposure design. Assumption checks and timing checks both matter.
Validate absolute predictions
Freeze predicted six-day resolution probabilities on a later case-created cohort. Verify that every case is either resolved by day six or observed at least through day six before using the simple bin-and-Brier calculation. Separate cases censored earlier, estimate how many there are by queue, and route evaluation to a censor-aware method if needed. Report predicted and observed shares with bin counts; a model may rank well yet overstate six-day resolution. The horizon lesson supplies a strict training fixture.
Make release or withhold explicit
The packet should name the cohort dates, status-code map, tie method, interval-case count, cancellation count, early-censor count, fit diagnostics, horizon support and calibration result. Withhold an absolute prediction claim when horizon status is unknown, an interval event has been coerced to an exact day, or the model fails a material assumption needed for the decision. The code below is a gate for the simple fully observed path; it does not fit or certify a survival model.
Implementation
def model_review_gate(case_records, horizon_days):
if horizon_days <= 0:
raise ValueError("invalid horizon")
if len({case_id for case_id, _, _, _, _ in case_records}) != len(case_records):
raise ValueError("duplicate case ID")
exact_events = interval_events = early_censors = 0
for case_id, observed_day, outcome, exact_time, baseline_priority in case_records:
if observed_day < 0 or baseline_priority not in (0, 1):
raise ValueError("invalid case record")
if outcome not in {"resolved", "cancelled", "open"}:
raise ValueError("unknown terminal status")
if outcome == "resolved":
exact_events += bool(exact_time)
interval_events += not exact_time
elif outcome == "open" and observed_day < horizon_days:
early_censors += 1
return {"exact_events": exact_events,
"interval_events": interval_events,
"early_censors": early_censors,
"simple_horizon_score_ready": interval_events == 0
and early_censors == 0}
ledger = [("M81", 2, "resolved", True, 1),
("M82", 5, "resolved", False, 0),
("M83", 4, "open", True, 1),
("M84", 8, "open", True, 0)]
review = model_review_gate(ledger, 6)
assert review["exact_events"] == 1
assert review["interval_events"] == 1
assert review["early_censors"] == 1
assert not review["simple_horizon_score_ready"]Performance and operating cost
A one-pass gate over N case records costs O(N) expected time for uniqueness checking and O(N) space for case IDs. Full model fitting, interval-aware inference and censor-adjusted validation have additional costs. The gate prevents unsupported evaluation claims; it is not a statistical approval certificate.
Common Mistakes
- Do not hide interval events by assigning their first observed resolved day as exact.
- Do not release a simple horizon score when cases disappear before the horizon.
- Do not interpret a fitted priority association as a randomized policy effect.
Read next
- Cox partial likelihood and hazard-ratio interpretation
- Diagnose the proportional-hazards assumption
- Interval-censored support resolution times
- Calibrate resolution predictions at a fixed horizon
Continue the workflow: Temporal validation of a support-resolution model.
