Skip to content

Commit fa79a89

Browse files
docs(proportional-hazards): improve narrative flow and fix line breaks
Refine text explanations, resolve spatial language ("below" -> "at or prior to"), and enforce semantic line breaks across Proportional Hazards subfiles. Co-authored-by: dem-extra1 <112029334+dem-extra1@users.noreply.github.com>
1 parent 1467de8 commit fa79a89

6 files changed

Lines changed: 36 additions & 25 deletions

File tree

_subfiles/proportional-hazards-models/_lem-ph-breslow-point-mass.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ But the hazard-density factor $\blue{\haz_0(t_i)}^{\delta_j}$ in @eq-ph-breslow-
3232
is maximized when all of that mass is concentrated as a single point at $t_i$
3333
(so $\blue{\haz_0(t_i)} = \blue{h_{0i}}$):
3434
spreading the same total mass across a wider neighborhood would leave less of it exactly at $t_i$,
35-
lowering $\blue{\haz_0(t_i)}$ below $\blue{h_{0i}}$, while leaving the survival penalty fixed.
35+
lowering $\blue{\haz_0(t_i)}$ to less than $\blue{h_{0i}}$, while leaving the survival penalty fixed.
3636
Since concentrating the mass strictly increases the hazard-density factor
3737
without changing the survival penalty, @eq-ph-breslow-full-lik is maximized by @eq-ph-breslow-point-mass.
3838
:::
@@ -48,7 +48,7 @@ Splitting the same total mass into two halves —
4848
$0.05$ exactly at $t_1$ and $0.05$ at a nearby non-event point —
4949
leaves only $\blue{\haz_0(t_1)} = 0.05$ at $t_1$ itself, *half* the hazard-density factor,
5050
while the cumulative hazard $\blue{\cuhaz_0(\tilde T_j)}$ (and hence every survival term)
51-
is unchanged, since both allocations place the same total mass $0.1$ below any $\tilde T_j \ge t_1$.
51+
is unchanged, since both allocations place the same total mass $0.1$ at or prior to any $\tilde T_j \ge t_1$.
5252
Splitting the mass therefore strictly decreases the likelihood,
5353
confirming that concentrating all of it at $t_1$ is optimal.
5454
:::

_subfiles/proportional-hazards-models/_proof-breslow-baseline-cuhaz-est.qmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Assume, as in the partial-likelihood proof, that there are no tied event times,
99
so each ordered event time $t_i$ corresponds to exactly one event,
1010
and let $K$ denote the number of distinct event times $t_1 < \cdots < t_K$.
1111

12-
Fix $\vb$. By @lem-ph-breslow-point-mass, the maximizing $\haz_0(\cdot)$
12+
Fix $\vb$.
13+
By @lem-ph-breslow-point-mass, the maximizing $\haz_0(\cdot)$
1314
places point masses $\blue{h_{0i}} \eqdef \blue{\haz_0(t_i)}$ only at the $K$ event times.
1415
By @lem-ph-breslow-profile-lik, substituting this form into @eq-ph-breslow-full-lik
1516
gives the profile likelihood @eq-ph-breslow-profile-lik in terms of the point masses

_subfiles/proportional-hazards-models/_sec-exm-coxph-bmt.qmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ The table provides hypothesis tests comparing groups 2 and 3 to group 1.
1313
Group 3 has the highest hazard, so the most significant comparison is
1414
not directly shown.
1515

16-
The coefficient `r round(coef(bmt.cox)["groupHigh Risk AML"], 4)` is on the log-hazard-ratio scale. The next column gives the hazard ratio `r round(exp(coef(bmt.cox)["groupHigh Risk AML"]), 4)`, and a hypothesis (Wald) test.
16+
The coefficient `r round(coef(bmt.cox)["groupHigh Risk AML"], 4)` is on the log-hazard-ratio scale.
17+
The next column gives the hazard ratio `r round(exp(coef(bmt.cox)["groupHigh Risk AML"]), 4)`, and a hypothesis (Wald) test.
1718

1819
The (not shown) group 3 vs. group 2 log hazard ratio is
1920
`r round(coef(bmt.cox)["groupHigh Risk AML"], 4)` − (`r round(coef(bmt.cox)["groupLow Risk AML"], 4)`) =
@@ -79,7 +80,9 @@ list(KM = km_fit, Cox = cox_fit) |>
7980
Survival Functions for Three Groups by KM and Cox Model
8081
:::
8182

82-
When we use `survfit()` with a Cox model, we have to specify the covariate levels we are interested in; the argument `newdata` should include a `data.frame` with the same named columns as the predictors in the Cox model and one or more levels of each.
83+
When we use `survfit()` with a Cox model,
84+
we have to specify the covariate levels we are interested in;
85+
the argument `newdata` should include a `data.frame` with the same named columns as the predictors in the Cox model and one or more levels of each.
8386

8487
{{< slidebreak >}}
8588

_subfiles/proportional-hazards-models/_sec-test-ph-assumption.qmd

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
::: notes
33
The Nelson-Aalen estimate of the cumulative hazard is usually used for estimates of the hazard and often the cumulative hazard.
44

5-
If the hazards of the three groups are proportional, that means that the ratio of the hazards is constant over $t$. We can test this using the ratios of the estimated cumulative hazards, which also would be
6-
proportional.
5+
If the hazards of the three groups are proportional,
6+
that means that the ratio of the hazards is constant over $t$.
7+
We can test this using the ratios of the estimated cumulative hazards,
8+
which also would be proportional.
79
:::
810

911
```{r}
@@ -82,7 +84,7 @@ Hazard Ratios by Disease Group (0-300 Days)
8284

8385
{{< slidebreak >}}
8486

85-
The cumulative hazard curves should also be proportional
87+
The cumulative hazard curves should also be proportional.
8688

8789
:::{#fig-cuhaz-bmt}
8890
```{r}
@@ -119,13 +121,15 @@ Disease-Free Cumulative Hazard by Disease Group (log-scale)
119121

120122
::: notes
121123
The Nelson-Aalen estimate of the cumulative hazard is usually used for
122-
estimates of the hazard. Since the hazard is the derivative of the
123-
cumulative hazard, we need a smooth estimate of the cumulative hazard,
124+
estimates of the hazard.
125+
Since the hazard is the derivative of the cumulative hazard,
126+
we need a smooth estimate of the cumulative hazard,
124127
which is provided by smoothing the step-function cumulative hazard.
125128

126-
The R package `muhaz` handles this for us. What we are looking for is
127-
whether the hazard function is more or less the same shape, increasing,
128-
decreasing, constant, etc. Are the hazards "proportional"?
129+
The R package `muhaz` handles this task.
130+
What we are looking for is whether the hazard function is more or less the same shape,
131+
increasing, decreasing, constant, etc.
132+
Are the hazards "proportional"?
129133
:::
130134

131135

_subfiles/proportional-hazards-models/_sec-understand-coxph.qmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ it is called the **proportional hazards assumption**.
207207
### proportional hazards
208208

209209
A conditional probability distribution $p(T|X)$
210-
has **proportional hazards** if the hazard ratio $\haz(t|\vx_1)/\haz(t|\vx_2)$ does not depend on $t$. Mathematically, it can be written as:
210+
has **proportional hazards** if the hazard ratio $\haz(t|\vx_1)/\haz(t|\vx_2)$
211+
does not depend on $t$.
212+
Mathematically, it can be written as:
211213

212214
$$
213215
\frac{\haz(t|\vx_1)}{\haz(t|\vx_2)}

_subfiles/proportional-hazards-models/_sec_coxph-adjust_ties.qmd

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ At each time $t_i$ at which more than one of the subjects has an event,
55
let $d_i$ be the number of events at that time, $D_i$ the set of
66
subjects with events at that time, and let $s_i$ be a covariate vector
77
for an artificial subject obtained by adding up the covariate values for
8-
the subjects with an event at time $t_i$. Let
8+
the subjects with an event at time $t_i$.
9+
Let
910
$$\bar\eta_i = \beta_1s_{i1}+\cdots+\beta_ps_{ip}$$ and
1011
$\bar\theta_i = \expf{\bar\eta_i}$.
1112

@@ -52,10 +53,11 @@ regression.
5253
#### Example: Breslow's method
5354

5455
Suppose as an example we have a time $t$ where there are 20 individuals
55-
at risk and three failures. Let the three individuals have risk
56+
at risk and three failures.
57+
Let the three individuals have risk
5658
parameters $\theta_1, \theta_2, \theta_3$ and let the sum of the risk
57-
parameters of the remaining 17 individuals be $\theta_R$. Then the
58-
factor in the partial likelihood at time $t$ using Breslow's method is
59+
parameters of the remaining 17 individuals be $\theta_R$.
60+
Then the factor in the partial likelihood at time $t$ using Breslow's method is
5961

6062
::: smaller
6163
$$
@@ -65,7 +67,7 @@ $$
6567
$$
6668
:::
6769

68-
If on the other hand, they had died in the order 1,2, 3, then the
70+
If on the other hand, they had died in the order 1, 2, 3, then the
6971
contribution to the partial likelihood would be:
7072

7173
::: smaller
@@ -76,15 +78,14 @@ $$
7678
$$
7779
:::
7880

79-
as the risk set got smaller with each failure. The exact method roughly
80-
averages the results for the six possible orderings of the failures.
81+
as the risk set got smaller with each failure.
82+
The exact method roughly averages the results for the six possible orderings of the failures.
8183

8284
#### Example: Efron's method
8385

84-
But we don't know the order they failed in, so instead of reducing the
85-
denominator by one risk coefficient each time, we reduce it by the same
86-
fraction.
87-
This fractional reduction approach is Efron's method.
86+
Because the exact failure order among tied event times is unobserved,
87+
rather than reducing the denominator by one risk coefficient at each step,
88+
Efron's method reduces it by a uniform fractional amount.
8889

8990
::: smaller
9091
$$\left(\frac{\theta_1}{\theta_R+\theta_1+\theta_2+\theta_3}\right)

0 commit comments

Comments
 (0)