Data Science – Medicine Application Project 2 Part 3

Recurrence is an event and a time

A recurrence percentage answers how many events were observed. It does not show when they occurred or how long each patient was followed.

This distinction matters when follow-up varies. A patient observed for 12 months does not contribute the same information as a patient observed for 60 months. Time-to-event analysis uses the available follow-up and treats records without recurrence as censored observations.

Start with transparent event summaries

Before fitting a survival model, it is useful to show the observed counts and Wilson confidence intervals.

| Group | Records | Recurrences | Recurrence percentage | 95% CI | Median follow-up |

|—|—:|—:|—:|—:|—:|

| Prolonged air leak indication | 163 | 23 | 14.1% | 9.6% to 20.3% | 32.5 months |

| Recurrent pneumothorax indication | 487 | 154 | 31.6% | 27.6% to 35.9% | 34.0 months |

| Bleb or bulla not visualized | 126 | 54 | 42.9% | 34.6% to 51.6% | 30.6 months |

| Operative finding unknown | 22 | 7 | 31.8% | 16.4% to 52.7% | 29.6 months |

| Bleb or bulla visualized | 502 | 116 | 23.1% | 19.6% to 27.0% | 34.1 months |

The complete summary is in `tables/05_recurrence_summary.csv`.

The confidence interval for the unknown group is wide because it contains only 22 records. This is a useful reminder that a percentage without its denominator can be misleading.

Kaplan-Meier estimation

The Kaplan-Meier method estimates the probability of remaining free from ipsilateral recurrence. Each recurrence changes the curve. A censored observation contributes information up to its last observed time.

The main unadjusted comparison uses records with a known operative finding. A log-rank test compares the full recurrence-free curves.

| Comparison | Log-rank chi-square | p-value |

|—|—:|—:|

| Bleb or bulla visualized compared with not visualized | 25.84 | <0.001 |

The test output is in `tables/05b_logrank_test.csv`.

Kaplan-Meier plot showing recurrence-free probability over months after operation.
Figure 4. Recurrence-free follow-up by operative finding. The curve for records without a visualized bleb or bulla falls more rapidly during follow-up. The log-rank p-value is below 0.001.

The plot describes an unadjusted difference. Other characteristics may differ between the groups. A multivariable model is needed to estimate the association while holding measured covariates constant.

Cox proportional-hazards regression

The Cox model relates patient characteristics to the instantaneous recurrence rate. Its main effect measure is the hazard ratio.

A hazard ratio above 1 indicates a higher recurrence rate during follow-up. A value below 1 indicates a lower rate. It is not a direct risk ratio and it does not state how many patients will recur.

The model includes operative indication, operative bleb status, age, sex, smoking history, previous tube thoracostomy, and multiple wedge resection. An additional indicator represents an unknown operative finding.

| Model term | Adjusted hazard ratio | 95% CI | p-value |

|—|—:|—:|—:|

| Recurrent-pneumothorax indication | 2.56 | 1.64 to 4.01 | <0.001 |

| Bleb or bulla not visualized | 2.72 | 1.96 to 3.77 | <0.001 |

| Operative finding unknown | 1.34 | 0.62 to 2.90 | 0.455 |

| Age, per 5 years | 0.86 | 0.72 to 1.01 | 0.072 |

| Male sex | 1.10 | 0.73 to 1.66 | 0.643 |

| Smoking history | 1.95 | 1.42 to 2.69 | <0.001 |

| Previous tube thoracostomy | 1.35 | 0.97 to 1.87 | 0.073 |

| Multiple wedge resection | 1.44 | 1.03 to 2.00 | 0.031 |

The complete model output is in `tables/06_cox_model.csv`.

Not visualizing a bleb or bulla is associated with a recurrence hazard about 2.7 times as high after adjustment. Recurrent-pneumothorax indication and smoking history also retain clear associations.

The multiple-wedge estimate is modest and its confidence interval is close to 1. It may reflect operative complexity or disease pattern. It should not be interpreted as evidence that performing more wedge resections causes recurrence.

Graph showing hazard ratios for various medical factors in recurrence study.
Figure 5. Adjusted associations with ipsilateral recurrence. Operative indication, absence of a visualized bleb or bulla, and smoking history have confidence intervals above 1.

Checking the proportional-hazards assumption

The Cox model assumes that each hazard ratio remains approximately constant over follow-up. Schoenfeld residuals can reveal a systematic relationship between a model term and event time.

| Model term | Spearman rho with log event time | Adjusted q |

|—|—:|—:|

| Recurrent-pneumothorax indication | -0.096 | 0.546 |

| Bleb or bulla not visualized | 0.097 | 0.546 |

| Operative finding unknown | 0.108 | 0.546 |

| Age, per 5 years | 0.012 | 0.967 |

| Male sex | 0.046 | 0.866 |

| Smoking history | -0.055 | 0.866 |

| Previous tube thoracostomy | -0.016 | 0.967 |

| Multiple wedge resection | -0.003 | 0.967 |

The diagnostic table is stored in `tables/07_proportional_hazards_checks.csv`.

No term shows strong evidence of a time trend after false-discovery-rate adjustment. This supports the model assumption within this analysis. It does not prove that the model captures every relevant clinical process.

Association is not treatment guidance

The survival analysis improves on a simple recurrence percentage. It uses follow-up time, handles censoring, reports uncertainty, and adjusts for several measured characteristics.

It still describes an observational association. Unmeasured disease severity, operative technique, surgeon judgment, and follow-up practice could affect the estimates. The model supports a structured clinical interpretation, not a recommendation for a more aggressive operation.

Part 4 asks a different question. Can routinely available information discriminate patients who experience recurrence within 24 months?

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

Discover more from Writing my way through ideas.

Subscribe now to keep reading and get access to the full archive.

Continue reading