vignettes/session_lecture.Rmd
session_lecture.Rmd
This is the Kaplan-Meier Estimate \(\hat S(t)\) of the Survival function \(S(t)\).
Definition: The survival function at time t, denoted \(S(t)\), is the probability of being event-free at t. Equivalently, it is the probability that the survival time is greater than t.
Definition: The cumulative event function at time t, denoted \(F(t)\), is the probability that the event has occurred by time t, or equivalently, the probability that the survival time is less than or equal to t. \(F(t) = 1-S(t)\).
Definition: The hazard function \(h(t)\) is the short-term event rate for subjects who have not yet experienced an event.
Definition: Under the proportional hazards assumption, the hazard ratio does not vary with time. That is, \(HR(t) \equiv HR\).
In other words, \(HR\) does not vary with time
## # A tibble: 2 × 2
## group haz
## <fct> <list>
## 1 Placebo <muhaz>
## 2 6 MP <muhaz>
\[ E[y_i|x_i] = \beta_1 x_{1i} + \beta_2 x_{2i} + ... + \beta_p x_{pi} \]
For logistic regression: \[ Logit(P(x_i)) = log \left( \frac{P(x_i)}{1-P(x_i)} \right) = \beta_1 x_{1i} + \beta_2 x_{2i} + ... + \beta_p x_{pi} \]
For log-linear regression: \[ log(E[y_i|x_i]) = \beta_1 x_{1i} + \beta_2 x_{2i} + ... + \beta_p x_{pi} \]
Multiplicative or additive model?
## Call:
## coxph(formula = Surv(time, cens) ~ group, data = leuk)
##
## n= 42, number of events= 30
##
## coef exp(coef) se(coef) z Pr(>|z|)
## group6 MP -1.5721 0.2076 0.4124 -3.812 0.000138 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## group6 MP 0.2076 4.817 0.09251 0.4659
##
## Concordance= 0.69 (se = 0.041 )
## Likelihood ratio test= 16.35 on 1 df, p=5e-05
## Wald test = 14.53 on 1 df, p=1e-04
## Score (logrank) test = 17.25 on 1 df, p=3e-05
Source: Using Time Dependent Covariates and Time Dependent Coefficients in the Cox Model
survival::coxph
with
survival::survreg