Skip to content

Commit

Permalink
tiny changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasSchmidtblaicherQC committed Nov 1, 2024
1 parent 699dfc8 commit d7fc939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/cox_model/cox_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"\n",
"## 1. Equivalence Between the Cox Likelihood and a Profile Poisson Likelihood<a class=\"anchor\"></a>\n",
"\n",
"In the Cox model, the rate of event occurrence, $\\lambda(t,x_i)$, factorizes nicely into a linear predictor $\\eta_i=\\sum_k \\beta_k x_{ik}$ that depends on individual $i$'s characteristics but not on time $t$ and a baseline hazard $\\lambda_0$ that depends only on time, $\\lambda(t,x_i)=\\lambda_0(t)\\exp(\\eta_i)$. The partial log-likelihood of $\\eta_i$ is\n",
"In the Cox model, the rate of event occurrence, $\\lambda(t,x_i)$, factorizes nicely into a linear predictor $\\eta_i=\\sum_k \\beta_k x_{ik}$ that depends on individual $i$'s characteristics but not on time $t$ and a baseline hazard $\\lambda_0$ that depends only on time, $\\lambda(t,x_i)=\\lambda_0(t)\\exp(\\eta_i)$ (proportional hazards assumption). The partial log-likelihood of $\\eta_i$ is\n",
"$$\n",
"\\sum_{\\text{event times}}\\log\\left(\\frac{\\exp(\\eta_{i}\\text{d}_t)}{\\sum_{i \\in \\mathcal{R}_t} \\exp(\\eta_i)} \\right),\n",
"\\sum_{\\text{event times}}\\log\\left(\\frac{\\exp(\\eta_{\\text{d}_t})}{\\sum_{i \\in \\mathcal{R}_t} \\exp(\\eta_i)} \\right),\n",
"$$\n",
"where $\\mathcal{R}_t$ is the set of individuals observed at event time $t$ and $\\text{d}_t$ is an indicator for the individual with an event at $t$.[<sup>1</sup>](#fn1) This partial log-likelihood cannot be represented as the log-likelihood of an EDM.[<sup>2</sup>](#fn2) Now consider an alternative Poisson regression with an event indicator for each individual and time period as outcome. Apart from a constant, the log likelihood is\n",
"$$\n",
Expand Down

0 comments on commit d7fc939

Please sign in to comment.