SlideShare a Scribd company logo
1 of 25
Download to read offline
Regression with Frailty in Survival analysis
STATS 756: Topics in Biostatistics - Fall 2021
Lim, Kyuson
Department of Mathematics and Statistics
McMaster University
October 29th, 2021
Kyuson Lim 1 / 25
Outline
1 Introduction/Motivation
2 Partial Likelihood
3 Penalize Partial Likelihood (PPL)
4 Newton-Raphson Method
5 Simulation Study
6 Expansion/Appendix
7 Biblibiography
Kyuson Lim 2 / 25
Survival analysis- How to survive?
The Cox proportional-hazards model (Cox, 1972) is essentially a regression model commonly used
statistical in medical research for investigating the association between the survival time of patients and one
or more predictor variables
A graph of survival analysis
The empirical hazard function is a step function evaluated at each time.
The survival probability, S(t) is the probability that an individual survives from time origin to a specified
future time t.
The hazard, h(t) is a continuous probability function that an individual who is under observation at a time t
has an event at that time.
Kyuson Lim 3 / 25
Survival analysis- Introduction
As the survival function is a decreasing from t = 0 to ∞ for continuous variable, the
distribution function is explained by F(t) = p(T ≤ t).
Hence,
S(t) = p(T > t) =
Z ∞
t
f(u)du = 1 − F(t)
For survival time T, hazard function h(t) = f(t)
S(t) and instantaneous time (4t → 0) illustrate
the event after time t, h(t) = −d(log S(t))
dt = f(t)
1−F(t) for cdf H(t) =
R t
0
h(u)du.
Therefore,
H(t) = − log(S(t))
and S(t) = exp(−H(t)).
If one is known, other two are easily determined.
Kyuson Lim 4 / 25
Survival analysis- Regression with frailty in survival analysis
Infections of kidney patients
A graph of survival analysis for Kidney data
Survival function defines a probability of surviving up to a point t, S(t) = p(T > t).
Hazard function is an instantaneous failure rate, given subject has survived up to time
t and fails in next small interval of time, h(t) = limδ→0
p(t<T<t+δ|T>t)
δ
Kyuson Lim 5 / 25
Survival analysis- Goal and Ideas
Cox proportional hazard model analyze the various influential covariates
simultaneously, where h0(t) is non-parametric part and exp(βxi) is parametric part.
Fit regression model to censored survival data and partial likelihood allows us to
compare 2 groups of survival data.
By maximized log-likelihood of β, Newton-Raphson algorithm is used to derive the
estimates.
Kyuson Lim 6 / 25
Cox proportional hazard model
An endpoint, a single cause of death, and the survival times of each case have been
assumed to be independent.
Methods for analyzing such survival data is not sufficient if cases are not independent or
if the event could occur repeatedly.
Proportional hazard model: h(t|xi ) = h0(t) exp(β0
xi (t)), β0
= (β1, .., βp)
A cluster-specific random effect terms have a relative effect on the baseline hazard
function, h0(xi ), reflect underlying hazard for subjects with all covariates x1, ..., xp equal
to 0.
For 2 covariates, x1 = 1 and x2 = 0, a hazard rate for treated group is
h1(t|xi = 1) = h0(t) exp(β), h1(t|xi = 1) = h1(t)
Two hazards is constant exp(β), not dependent on time (t) and two hazards ratio of 2 groups
remain proportional over time
h1(t)
h0(t)
= exp(β)
Kyuson Lim 7 / 25
Parametric cox model with frailty term
In clustered data, survival times of individuals that are in same unit or family, meaning that
survival times within a cluster are similar, then the independence no longer holds.
To accommodate such structure of subjects in the same cluster is to assign each individual in
a cluster a common factor known as a frailty or as random effect.
A random effects incorporated for within-cluster homogeneity in outcomes 1
.
Shared frailty model: h(t|xij ) = h0(t) exp(β0
xij (t) + wi )
wi : random effect for ith cluster for all individuals, vary across clusters.
Subjects in the same cluster all share the same frailty factor.
A frailty model refer to a survival model with only a random intercept.
In the paper, log-frailities are assumed to be normally distributed with
E(log(wi )) = 0, Var(log(wi )) = σ2
(I − M−1
110
) 2
1
increase/decrease hazard for distinct class
2
wi = 1, 10
u = 0
Kyuson Lim 8 / 25
Partial likelihood
Goal: estimate β that does not depend on h0(t) for ordered death time of r individuals,
t(1) < · · · < t(r).
Define risk set, R(t(j)), to be the group of individuals who are alive and uncensored at at
a time prior to t(j).
P(individuals i dies at t(j) given one individual from risk set on R(t(j)) dies at t(j)| one
death from the risk set R(t(j)) at t(j)) = P(individual i dies at t(j))/P( one death at t(j))
⇔
hi (tj |xi )
P
k∈R(t(j)) hk (ti |xj )
=
h0(t(j)) exp(β0
xi )
P
k∈R(t(j)) h0(t(j)) exp(β0
xk )
=
exp(β0
xi )
P
k∈R(t(j)) exp(β0
xk )
Partial likelihood: L(β) = Πr
j=1
exp(β0
xi )
P
k∈R(t(j)) exp(β0
xk )
, r ∈ {t(1), ..., t(r)}(survival time)
xi is a vector of covariates for individual i who dies at t(j).
A partial likelihood allow to use unspecified baseline survival distribution to define a survival
distributions of subjects based on their covariates.
Kyuson Lim 9 / 25
Breslow Partial likelihood
A likelihood function is only for uncensored individuals.
L(β) = Πn
i=1
(
exp(β0
xi )
P
k∈R(t(j)) exp(β0
xk )
)di
t1, ..., tn: observed survival time for n individuals.
di : event indicator, 0 if ith survival time is censored.
log L(β) =
n
X
i=1
log

Πr
j=1
exp(β0
xi )
P
k∈R(t(j)) exp(β0
xk )

=
n
X
i=1
di log

exp(β0
xi )
P
k∈R(t(j)) exp(β0
xk )

=
n
X
i=1
di log(exp(β0
xi ) −
n
X
i=1
di log
X
k∈R(t(j))
exp(β0
xk )

=
n
X
i=1
di β0
xi −
n
X
i=1
di log
X
k∈R(t(j))
exp(β0
xk )

The partial likelihood is valid when there are no two subjects who have same event time.
Variation of hazard rate attribute to dependence of risk variables or frailty terms, hence the frailty is a random
component.
Kyuson Lim 10 / 25
Example for computing Partial likelihood
At time 0, 6 patients are at a risk of experiencing an event, which is defined as group of patients for initial set R1.
1 Before first failure at time t = 6, 6 patients are at risk and anyone could experience event.
2 By groups, exp(x1β) = exp(x2β) = exp(x4β) = 1, exp(x3β) = exp(x5β) = exp(x6β) = exp(β)
Patient Survtime Censor Group
1 6 1 C
2 7 0 C
3 10 1 T
4 15 1 T
5 19 0 T
6 25 1 T
Table 1. Survival data
3 Substitute for p1 = h0(t1) exp(xi β)
P
k∈R1
h0(t1) exp(xk β) , where h0(t1) is the hazard for a subject from a control group, yield
p1 = 1h0(t1)
3h0(t1) exp(β)+3h0(t1) = 1
3 exp(β)+3 .
4 At time 7, a control patient dropped out and at t = 10, p2 = exp(β)
3 exp(β)+1 as well as at time t = 15 three patients at
risk to give p3 = 1
2 exp(β)+1 .
5 At last event t = 25, one subject is at risk with partial likelihood to be the product of all, L(exp(β))
= exp(β)
(3 exp(β)+3)(3 exp(β)+1)(2 exp(β)+1) .
6 Taking the log transformation, l(β) = β − log(3 exp(β) + 3) − log(3 exp(β) + 1) − log(2 exp(β) + 1).
Kyuson Lim 11 / 25
Example for computing Partial likelihood
A partial likelihood is maximized to obtain for the estimate of β.
 plsimple - function(beta) {
+ psi - exp(beta)
+ result - log(psi) - log(3*psi + 3) - log(3*psi + 1) - log(2*psi + 1)
+ result }
 result - optim(par=0, fn = plsimple, method = L-BFGS-B,
control=list(fnscale = -1), lower = -3, upper = 1)
 result$par
[1] -1.326129
Maximum partial likelihood estimate by Newton-Rapshon algorithm
The solid curved black line is a plot of the log partial likelihood over a range of values of β.
The maximum is indicated by the vertical dashed blue line, and the value of the log-partial likelihood at a point is
-3.672.
The value -4.277 of the log-partial likelihood is at the null hypothesis value, β = 0.
Kyuson Lim 12 / 25
Penalize Partial Likelihood (PPL)
Taking a log, random effect are treated as penalty term in GLM by the Best Linear Unbiased
Prediction (BLUP)
Maximization in PPL is a double iterative process, alternates between inner (lpart ) and outer
loop (lpenalize) until convergence.
A penalty term of random effect is far away from mean value 0, by reducing a penalized
partial likelihood.
If wi ∼ N(0, σ2
D) where D is known matrix, then BLUP consists of maximizing a sum of two
log-likelihood:
lPPL(θ, β, w) = lpart (β, w) − lpenalize(θ, w)
lpart (β, w): conditional likelihood for data given frailties.
lpenalize(θ, w): stands for the distribution for frailties.
In lpart , a Newton-Raphson uses local quadratic approximations of penalty term.
Iterate to estimate β and wi , using the derivative of likelihood and variance matrix, V.
Kyuson Lim 13 / 25
Newton-Raphson algorithm
Originated from Taylor’s series f(x) ≈ f(xk ) + (x − xk )f0
(xk ) + 1
2! (x − xk )2
f00
(xk ) + · · ·
+ 1
n! (x − xk )n
f(n)
(xk ), the system of non-linear equations is solved by the procedure of
Newton-Raphson method.
Approximate roots, f(β) = 0
1 Start with initial value β(0)
of β.
2 First-order linear approximation of f at β(0)
+ h:
f(β(0)
+ h) ≈ f(β(0)
) + hf0
(β(0)
)
3 Solve to find solution β(1)
(updated) = β(0)
+ h of f(β) = 0 ⇒ f(β(1)
) = 0 by
h = −{f0
(β(0)
)}−1
f(β(0)
) and thus β(1)
= β(0)
− {f0
(β(0)
)}−1
f(β(0)
)
4 Iterate until process converges β(k+1)
≈ β(k)
.
A GLM (poisson, logistic) uses the method of iteration for estimating the coefficients.
A Newton-Raphson procedure converge if sufficient variation of measure risk variables exists
within each patients.
Kyuson Lim 14 / 25
Newton-Raphson algorithm - Visual illustration
Produces better approximations to the roots of a real-valued function.
xn+1 = xn −
f(xn)
f0(xn)
For example, when f(x) = x2
− a and f0
(x) = 2x, the initial guess is x0 = 10 and the
difference is set to be small to iterate until convergence.
x1 = x0 −
f(x0)
f0(x0)
= 10 −
102 − 612
2 × 10
= 35.6
x2 = x1 −
f(x1)
f0(x1)
= 35.6 −
35.62 − 612
2 × 35.6
= 26.395
x3 = · · · = 24.790
x4 = · · · = 24.7376
x5 = · · · = 24.738633753
A graph of Newton-Raphson method in quadratic formula
Kyuson Lim 15 / 25
Newton-Raphson iterative procedure
With initial estimate of β0, w0, the goal is to iteratively estimate β with PPL.
Log-likelihood is approximately quadratic in region of true values.
Maximizing lpart − lpenalize gives estimators where a joint log-likelihood is lPPL,

β̂
ŵ

=

β0
w0

+ V−1

∂lpart /∂β0
∂lpart /∂w0

− V−1

0
σ−2w0

, V =

−∂2lpart /∂β∂β0
−∂2lpart /∂β∂w0
−∂2lpart /∂β∂β0
−∂2lpart /∂w∂w0 + σ−2I

The variance matrix V taken to be σ2
(I − M−1
), 10
V = 0.
β̂, ŵ has approximately a joint normal distribution with mean β, w with variance matrix V.
Kyuson Lim 16 / 25
Simulation study: Infections in Kidney Patient
The data contains recurrence times to infection, at the point of insertion of the catheter, for
kidney patients using portable dialysis equipment.
Disease types are classified as 0 = GN, 1 = AN, 2 = PKD, 3 = other.
A patient have two recurrence times given, as Infection occurs = 1 and censored = 0.
A 5 regression variables are fitted with age, sex and presence or absence of disease type.
The package used is ‘survival’ (p.55), where the data of the original paper is preserved
for public access.
Package of ‘ggsurvplot’ (survival plot), ‘ggforest’ (hazard ratio) is used to model and run
model diagnostics.
Kyuson Lim 17 / 25
Simulation study: specified distribution
The data of 76 patients for
 data(kidney)
 kfitm1 - coxph(Surv(time,status) ~ age + sex + disease + frailty(id, dist=’gauss’))
 kfitm1
Call:
coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id,
dist = gauss), data = kidney)
coef se(coef) se2 Chisq DF p
age 0.00489 0.01497 0.01059 0.10678 1.0 0.74384
sex -1.69728 0.46101 0.36170 13.55454 1.0 0.00023
diseaseGN 0.17986 0.54485 0.39273 0.10897 1.0 0.74131
diseaseAN 0.39294 0.54482 0.39816 0.52016 1.0 0.47077
diseasePKD -1.13631 0.82519 0.61728 1.89621 1.0 0.16850
frailty(id, dist = gauss 17.89195 12.1 0.12376
Iterations: 7 outer, 42 Newton-Raphson
Variance of random effect= 0.493
Degrees of freedom for terms= 0.5 0.6 1.7 12.1
Likelihood ratio test=47.5 on 14.9 df, p=3e-05
n= 76, number of events= 58
The only regression coefficient with -1.697 that is significantly large compared to its
standard error is that of the sex variable, indicating a lower infection rate for female patients.
Kyuson Lim 18 / 25
Simulation study: Infections in Kidney patients
The estimate of σ2 = 0.3821. In general, the effect of the prior distribution on frailty terms is to
shrink estimates toward the origin, which bias the estimate.
 kfit - coxph(Surv(time, status)~ age + sex + disease + frailty(id), kidney)
 kfit
Iterations: 6 outer, 35 Newton-Raphson
Variance of random effect= 5e-07 I-likelihood = -179.1
Degrees of freedom for terms= 1 1 3 0
Likelihood ratio test=17.6 on 5 df, p=0.003
n= 76, number of events= 58
 round(kfit$coefficients, 3)
age sex diseaseGN diseaseAN diseasePKD
0.003 -1.483 0.088 0.351 -1.431
Kyuson Lim 19 / 25
Simulation study: Infections in Kidney patients
Test the proportional hazards assumption for a Cox regression model fit (coxph).
 cox.zph(kfit)
chisq df p
age 0.105 1 0.746
sex 5.953 1 0.015
disease 1.985 3 0.576
GLOBAL 7.869 5 0.164
Figure: A graph of coefficient vs. time
The plot gives an estimate of the time-dependent coefficient β(t). If the proportional hazards
assumption holds then the true β(t) function would be a horizontal line, slope of 0.
Kyuson Lim 20 / 25
Simulation study: Linearity
Martingale residuals: a discrepancy between the observed value of a subject’s failure indicator and its expected
value, integrated over the time for which that patient was at risk.
The martingale residuals are plotted against covariates to detect nonlinearity.
Plots of martingale residuals and partial residuals are examined against the last two of covariates, age and sex.
Smooths are produced by local linear regression (using the lowess function).
There are no observed non-linearity.
Kyuson Lim 21 / 25
Simulation study: Influential points
Comparing the magnitudes of the largest values to the regression coefficients suggests that 1 observation is
influential individually.
One of the males (id 21) is a large outlier, with much longer survival than his peers. If this observation is removed no
evidence remains for a random subject effect.
Kyuson Lim 22 / 25
Cox proportional hazard model
The predicted survival profiles for patients 5, and 12 is modeled.
Predicted survival curves for three patients using the penalization
Kyuson Lim 23 / 25
Generalized gamma frailty model
The paper presents a frailty model using the generalized gamma distribution as the frailty
distribution, and lognormal, Weibull frailty model as special cases.
Written by Dr. N. Balakrishnan, the BLUP method of this paper is addressed for modeling a
new frailty model with generalized gamma distribution that has more parameters to be less
parametric and more flexible.
Instead of EM algorithm, the Newton-Raphson algorithm is applied to obtain the MLE of
parameters.
The use of generalized gamma distribution as the frailty distribution in a frailty model has
substantially improved the goodness-of-fit of the frailty model.
The model is particularly useful in reducing errors in frailty variance estimation. Also, the
performance of the likelihood ratio test depends on the cluster size.
Kyuson Lim 24 / 25
References
Regression with Frailty in Survival Analysis [C. A. McGilchrist and C. W. Aisbett]
https://www.jstor.org/stable/2532138?casa_token=cxuDrkxyJzUAAAAA%
3AEnp4ejKDMHcBHgMbROgKulGAA-lUE0Iw16oVqCSqDXPbWGutHjuBeIJ7URMAZSIioGrZdBNLmqvx4fYUX_
3D0LUaBnEGd-dVIBW88Bkm6vPgEhEca24seq=1#metadata_info_tab_contents.
Generalized gamma frailty model [N. Balakrishnan and Yingwei Peng]
https://pubmed.ncbi.nlm.nih.gov/16220516/
(R) Package ‘survival’ [Terry M Therneau, et. al]
https://cran.r-project.org/web/packages/survival/survival.pdf
Applied Survival Analysis Using R [Dirk F Moore]
https://link.springer.com/book/10.1007/978-3-319-31245-3
Thank you for the participation and understandings !
Kyuson Lim 25 / 25

More Related Content

What's hot

Survival Analysis
Survival AnalysisSurvival Analysis
Survival AnalysisSMAliKazemi
 
R workshop xiv--Survival Analysis with R
R workshop xiv--Survival Analysis with RR workshop xiv--Survival Analysis with R
R workshop xiv--Survival Analysis with RVivian S. Zhang
 
Survival analysis
Survival analysisSurvival analysis
Survival analysisHar Jindal
 
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik JakartaSurvival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik JakartaSetia Pramana
 
Survival Analysis Lecture.ppt
Survival Analysis Lecture.pptSurvival Analysis Lecture.ppt
Survival Analysis Lecture.ppthabtamu biazin
 
Introduction To Survival Analysis
Introduction To Survival AnalysisIntroduction To Survival Analysis
Introduction To Survival Analysisfedericorotolo
 
A gentle introduction to survival analysis
A gentle introduction to survival analysisA gentle introduction to survival analysis
A gentle introduction to survival analysisAngelo Tinazzi
 
1. Introduction to Survival analysis
1. Introduction to Survival analysis1. Introduction to Survival analysis
1. Introduction to Survival analysisGhada Abu sheasha
 
Survival Analysis Using SPSS
Survival Analysis Using SPSSSurvival Analysis Using SPSS
Survival Analysis Using SPSSNermin Osman
 
Kaplan meier survival curves and the log-rank test
Kaplan meier survival curves and the log-rank testKaplan meier survival curves and the log-rank test
Kaplan meier survival curves and the log-rank testzhe1
 
APG Pertemuan 5 : Inferensia Vektor Rata-rata 1 Populasi
APG Pertemuan 5 : Inferensia Vektor Rata-rata 1 PopulasiAPG Pertemuan 5 : Inferensia Vektor Rata-rata 1 Populasi
APG Pertemuan 5 : Inferensia Vektor Rata-rata 1 PopulasiRani Nooraeni
 
Analisis Komponen Utama (1)
Analisis Komponen Utama (1)Analisis Komponen Utama (1)
Analisis Komponen Utama (1)Rani Nooraeni
 

What's hot (20)

Survival Analysis
Survival AnalysisSurvival Analysis
Survival Analysis
 
Survival analysis
Survival  analysisSurvival  analysis
Survival analysis
 
R workshop xiv--Survival Analysis with R
R workshop xiv--Survival Analysis with RR workshop xiv--Survival Analysis with R
R workshop xiv--Survival Analysis with R
 
Survival analysis
Survival analysisSurvival analysis
Survival analysis
 
Survival analysis
Survival analysisSurvival analysis
Survival analysis
 
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik JakartaSurvival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
 
Survival Analysis Lecture.ppt
Survival Analysis Lecture.pptSurvival Analysis Lecture.ppt
Survival Analysis Lecture.ppt
 
Introduction To Survival Analysis
Introduction To Survival AnalysisIntroduction To Survival Analysis
Introduction To Survival Analysis
 
A gentle introduction to survival analysis
A gentle introduction to survival analysisA gentle introduction to survival analysis
A gentle introduction to survival analysis
 
Hazard ratios
Hazard ratiosHazard ratios
Hazard ratios
 
1. Introduction to Survival analysis
1. Introduction to Survival analysis1. Introduction to Survival analysis
1. Introduction to Survival analysis
 
Survival Analysis Using SPSS
Survival Analysis Using SPSSSurvival Analysis Using SPSS
Survival Analysis Using SPSS
 
Kaplan meier survival curves and the log-rank test
Kaplan meier survival curves and the log-rank testKaplan meier survival curves and the log-rank test
Kaplan meier survival curves and the log-rank test
 
Part 2 Cox Regression
Part 2 Cox RegressionPart 2 Cox Regression
Part 2 Cox Regression
 
Statistical Distributions
Statistical DistributionsStatistical Distributions
Statistical Distributions
 
APG Pertemuan 5 : Inferensia Vektor Rata-rata 1 Populasi
APG Pertemuan 5 : Inferensia Vektor Rata-rata 1 PopulasiAPG Pertemuan 5 : Inferensia Vektor Rata-rata 1 Populasi
APG Pertemuan 5 : Inferensia Vektor Rata-rata 1 Populasi
 
Survival Analysis Project
Survival Analysis Project Survival Analysis Project
Survival Analysis Project
 
Analisis Komponen Utama (1)
Analisis Komponen Utama (1)Analisis Komponen Utama (1)
Analisis Komponen Utama (1)
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Poisson regression models for count data
Poisson regression models for count dataPoisson regression models for count data
Poisson regression models for count data
 

Similar to Survival analysis 1

The tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsThe tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsColin Gillespie
 
2 Review of Statistics. 2 Review of Statistics.
2 Review of Statistics. 2 Review of Statistics.2 Review of Statistics. 2 Review of Statistics.
2 Review of Statistics. 2 Review of Statistics.WeihanKhor2
 
Principles of Actuarial Science Chapter 3
Principles of Actuarial Science Chapter 3Principles of Actuarial Science Chapter 3
Principles of Actuarial Science Chapter 3ssuser8226b2
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)ijceronline
 
Chapter-4 combined.pptx
Chapter-4 combined.pptxChapter-4 combined.pptx
Chapter-4 combined.pptxHamzaHaji6
 
Sequential experimentation in clinical trials
Sequential experimentation in clinical trialsSequential experimentation in clinical trials
Sequential experimentation in clinical trialsSpringer
 
Chapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptxChapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptxVimalMehta19
 
Problem_Session_Notes
Problem_Session_NotesProblem_Session_Notes
Problem_Session_NotesLu Mao
 
Lec 2 discrete random variable
Lec 2 discrete random variableLec 2 discrete random variable
Lec 2 discrete random variablecairo university
 
Frequency14.pptx
Frequency14.pptxFrequency14.pptx
Frequency14.pptxMewadaHiren
 
Looking Inside Mechanistic Models of Carcinogenesis
Looking Inside Mechanistic Models of CarcinogenesisLooking Inside Mechanistic Models of Carcinogenesis
Looking Inside Mechanistic Models of CarcinogenesisSascha Zöllner
 
Chapter 3 – Random Variables and Probability Distributions
Chapter 3 – Random Variables and Probability DistributionsChapter 3 – Random Variables and Probability Distributions
Chapter 3 – Random Variables and Probability DistributionsJasonTagapanGulla
 
STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...
STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...
STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...Carlos M Martínez M
 
ISM_Session_5 _ 23rd and 24th December.pptx
ISM_Session_5 _ 23rd and 24th December.pptxISM_Session_5 _ 23rd and 24th December.pptx
ISM_Session_5 _ 23rd and 24th December.pptxssuser1eba67
 
2012 mdsp pr05 particle filter
2012 mdsp pr05 particle filter2012 mdsp pr05 particle filter
2012 mdsp pr05 particle filternozomuhamada
 

Similar to Survival analysis 1 (20)

The tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsThe tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic models
 
International Journal of Engineering Inventions (IJEI),
International Journal of Engineering Inventions (IJEI), International Journal of Engineering Inventions (IJEI),
International Journal of Engineering Inventions (IJEI),
 
2 Review of Statistics. 2 Review of Statistics.
2 Review of Statistics. 2 Review of Statistics.2 Review of Statistics. 2 Review of Statistics.
2 Review of Statistics. 2 Review of Statistics.
 
Principles of Actuarial Science Chapter 3
Principles of Actuarial Science Chapter 3Principles of Actuarial Science Chapter 3
Principles of Actuarial Science Chapter 3
 
Poster_PingPong
Poster_PingPongPoster_PingPong
Poster_PingPong
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Chapter-4 combined.pptx
Chapter-4 combined.pptxChapter-4 combined.pptx
Chapter-4 combined.pptx
 
Sequential experimentation in clinical trials
Sequential experimentation in clinical trialsSequential experimentation in clinical trials
Sequential experimentation in clinical trials
 
Chapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptxChapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptx
 
Problem_Session_Notes
Problem_Session_NotesProblem_Session_Notes
Problem_Session_Notes
 
ResearchPaper
ResearchPaperResearchPaper
ResearchPaper
 
Lec 2 discrete random variable
Lec 2 discrete random variableLec 2 discrete random variable
Lec 2 discrete random variable
 
Frequency14.pptx
Frequency14.pptxFrequency14.pptx
Frequency14.pptx
 
Looking Inside Mechanistic Models of Carcinogenesis
Looking Inside Mechanistic Models of CarcinogenesisLooking Inside Mechanistic Models of Carcinogenesis
Looking Inside Mechanistic Models of Carcinogenesis
 
Talk 3
Talk 3Talk 3
Talk 3
 
Chapter 3 – Random Variables and Probability Distributions
Chapter 3 – Random Variables and Probability DistributionsChapter 3 – Random Variables and Probability Distributions
Chapter 3 – Random Variables and Probability Distributions
 
Jere Koskela slides
Jere Koskela slidesJere Koskela slides
Jere Koskela slides
 
STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...
STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...
STATISTICAL TESTS TO COMPARE k SURVIVAL ANALYSIS FUNCTIONS INVOLVING RECURREN...
 
ISM_Session_5 _ 23rd and 24th December.pptx
ISM_Session_5 _ 23rd and 24th December.pptxISM_Session_5 _ 23rd and 24th December.pptx
ISM_Session_5 _ 23rd and 24th December.pptx
 
2012 mdsp pr05 particle filter
2012 mdsp pr05 particle filter2012 mdsp pr05 particle filter
2012 mdsp pr05 particle filter
 

More from KyusonLim

ROC Korean drought presentation.pptx
ROC Korean drought presentation.pptxROC Korean drought presentation.pptx
ROC Korean drought presentation.pptxKyusonLim
 
Text mining and its association analysis.pdf
Text mining and its association analysis.pdfText mining and its association analysis.pdf
Text mining and its association analysis.pdfKyusonLim
 
Regularization and variable selection via elastic net
Regularization and variable selection via elastic netRegularization and variable selection via elastic net
Regularization and variable selection via elastic netKyusonLim
 
ideas of mathematics -17tilings (final)
ideas of mathematics -17tilings (final)ideas of mathematics -17tilings (final)
ideas of mathematics -17tilings (final)KyusonLim
 
BlUP and BLUE- REML of linear mixed model
BlUP and BLUE- REML of linear mixed modelBlUP and BLUE- REML of linear mixed model
BlUP and BLUE- REML of linear mixed modelKyusonLim
 
Missing value imputation (slide)
Missing value imputation (slide)Missing value imputation (slide)
Missing value imputation (slide)KyusonLim
 

More from KyusonLim (7)

ROC Korean drought presentation.pptx
ROC Korean drought presentation.pptxROC Korean drought presentation.pptx
ROC Korean drought presentation.pptx
 
Text mining and its association analysis.pdf
Text mining and its association analysis.pdfText mining and its association analysis.pdf
Text mining and its association analysis.pdf
 
Dag in mmhc
Dag in mmhcDag in mmhc
Dag in mmhc
 
Regularization and variable selection via elastic net
Regularization and variable selection via elastic netRegularization and variable selection via elastic net
Regularization and variable selection via elastic net
 
ideas of mathematics -17tilings (final)
ideas of mathematics -17tilings (final)ideas of mathematics -17tilings (final)
ideas of mathematics -17tilings (final)
 
BlUP and BLUE- REML of linear mixed model
BlUP and BLUE- REML of linear mixed modelBlUP and BLUE- REML of linear mixed model
BlUP and BLUE- REML of linear mixed model
 
Missing value imputation (slide)
Missing value imputation (slide)Missing value imputation (slide)
Missing value imputation (slide)
 

Recently uploaded

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...ThinkInnovation
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 

Survival analysis 1

  • 1. Regression with Frailty in Survival analysis STATS 756: Topics in Biostatistics - Fall 2021 Lim, Kyuson Department of Mathematics and Statistics McMaster University October 29th, 2021 Kyuson Lim 1 / 25
  • 2. Outline 1 Introduction/Motivation 2 Partial Likelihood 3 Penalize Partial Likelihood (PPL) 4 Newton-Raphson Method 5 Simulation Study 6 Expansion/Appendix 7 Biblibiography Kyuson Lim 2 / 25
  • 3. Survival analysis- How to survive? The Cox proportional-hazards model (Cox, 1972) is essentially a regression model commonly used statistical in medical research for investigating the association between the survival time of patients and one or more predictor variables A graph of survival analysis The empirical hazard function is a step function evaluated at each time. The survival probability, S(t) is the probability that an individual survives from time origin to a specified future time t. The hazard, h(t) is a continuous probability function that an individual who is under observation at a time t has an event at that time. Kyuson Lim 3 / 25
  • 4. Survival analysis- Introduction As the survival function is a decreasing from t = 0 to ∞ for continuous variable, the distribution function is explained by F(t) = p(T ≤ t). Hence, S(t) = p(T > t) = Z ∞ t f(u)du = 1 − F(t) For survival time T, hazard function h(t) = f(t) S(t) and instantaneous time (4t → 0) illustrate the event after time t, h(t) = −d(log S(t)) dt = f(t) 1−F(t) for cdf H(t) = R t 0 h(u)du. Therefore, H(t) = − log(S(t)) and S(t) = exp(−H(t)). If one is known, other two are easily determined. Kyuson Lim 4 / 25
  • 5. Survival analysis- Regression with frailty in survival analysis Infections of kidney patients A graph of survival analysis for Kidney data Survival function defines a probability of surviving up to a point t, S(t) = p(T > t). Hazard function is an instantaneous failure rate, given subject has survived up to time t and fails in next small interval of time, h(t) = limδ→0 p(t<T<t+δ|T>t) δ Kyuson Lim 5 / 25
  • 6. Survival analysis- Goal and Ideas Cox proportional hazard model analyze the various influential covariates simultaneously, where h0(t) is non-parametric part and exp(βxi) is parametric part. Fit regression model to censored survival data and partial likelihood allows us to compare 2 groups of survival data. By maximized log-likelihood of β, Newton-Raphson algorithm is used to derive the estimates. Kyuson Lim 6 / 25
  • 7. Cox proportional hazard model An endpoint, a single cause of death, and the survival times of each case have been assumed to be independent. Methods for analyzing such survival data is not sufficient if cases are not independent or if the event could occur repeatedly. Proportional hazard model: h(t|xi ) = h0(t) exp(β0 xi (t)), β0 = (β1, .., βp) A cluster-specific random effect terms have a relative effect on the baseline hazard function, h0(xi ), reflect underlying hazard for subjects with all covariates x1, ..., xp equal to 0. For 2 covariates, x1 = 1 and x2 = 0, a hazard rate for treated group is h1(t|xi = 1) = h0(t) exp(β), h1(t|xi = 1) = h1(t) Two hazards is constant exp(β), not dependent on time (t) and two hazards ratio of 2 groups remain proportional over time h1(t) h0(t) = exp(β) Kyuson Lim 7 / 25
  • 8. Parametric cox model with frailty term In clustered data, survival times of individuals that are in same unit or family, meaning that survival times within a cluster are similar, then the independence no longer holds. To accommodate such structure of subjects in the same cluster is to assign each individual in a cluster a common factor known as a frailty or as random effect. A random effects incorporated for within-cluster homogeneity in outcomes 1 . Shared frailty model: h(t|xij ) = h0(t) exp(β0 xij (t) + wi ) wi : random effect for ith cluster for all individuals, vary across clusters. Subjects in the same cluster all share the same frailty factor. A frailty model refer to a survival model with only a random intercept. In the paper, log-frailities are assumed to be normally distributed with E(log(wi )) = 0, Var(log(wi )) = σ2 (I − M−1 110 ) 2 1 increase/decrease hazard for distinct class 2 wi = 1, 10 u = 0 Kyuson Lim 8 / 25
  • 9. Partial likelihood Goal: estimate β that does not depend on h0(t) for ordered death time of r individuals, t(1) < · · · < t(r). Define risk set, R(t(j)), to be the group of individuals who are alive and uncensored at at a time prior to t(j). P(individuals i dies at t(j) given one individual from risk set on R(t(j)) dies at t(j)| one death from the risk set R(t(j)) at t(j)) = P(individual i dies at t(j))/P( one death at t(j)) ⇔ hi (tj |xi ) P k∈R(t(j)) hk (ti |xj ) = h0(t(j)) exp(β0 xi ) P k∈R(t(j)) h0(t(j)) exp(β0 xk ) = exp(β0 xi ) P k∈R(t(j)) exp(β0 xk ) Partial likelihood: L(β) = Πr j=1 exp(β0 xi ) P k∈R(t(j)) exp(β0 xk ) , r ∈ {t(1), ..., t(r)}(survival time) xi is a vector of covariates for individual i who dies at t(j). A partial likelihood allow to use unspecified baseline survival distribution to define a survival distributions of subjects based on their covariates. Kyuson Lim 9 / 25
  • 10. Breslow Partial likelihood A likelihood function is only for uncensored individuals. L(β) = Πn i=1 ( exp(β0 xi ) P k∈R(t(j)) exp(β0 xk ) )di t1, ..., tn: observed survival time for n individuals. di : event indicator, 0 if ith survival time is censored. log L(β) = n X i=1 log Πr j=1 exp(β0 xi ) P k∈R(t(j)) exp(β0 xk ) = n X i=1 di log exp(β0 xi ) P k∈R(t(j)) exp(β0 xk ) = n X i=1 di log(exp(β0 xi ) − n X i=1 di log X k∈R(t(j)) exp(β0 xk ) = n X i=1 di β0 xi − n X i=1 di log X k∈R(t(j)) exp(β0 xk ) The partial likelihood is valid when there are no two subjects who have same event time. Variation of hazard rate attribute to dependence of risk variables or frailty terms, hence the frailty is a random component. Kyuson Lim 10 / 25
  • 11. Example for computing Partial likelihood At time 0, 6 patients are at a risk of experiencing an event, which is defined as group of patients for initial set R1. 1 Before first failure at time t = 6, 6 patients are at risk and anyone could experience event. 2 By groups, exp(x1β) = exp(x2β) = exp(x4β) = 1, exp(x3β) = exp(x5β) = exp(x6β) = exp(β) Patient Survtime Censor Group 1 6 1 C 2 7 0 C 3 10 1 T 4 15 1 T 5 19 0 T 6 25 1 T Table 1. Survival data 3 Substitute for p1 = h0(t1) exp(xi β) P k∈R1 h0(t1) exp(xk β) , where h0(t1) is the hazard for a subject from a control group, yield p1 = 1h0(t1) 3h0(t1) exp(β)+3h0(t1) = 1 3 exp(β)+3 . 4 At time 7, a control patient dropped out and at t = 10, p2 = exp(β) 3 exp(β)+1 as well as at time t = 15 three patients at risk to give p3 = 1 2 exp(β)+1 . 5 At last event t = 25, one subject is at risk with partial likelihood to be the product of all, L(exp(β)) = exp(β) (3 exp(β)+3)(3 exp(β)+1)(2 exp(β)+1) . 6 Taking the log transformation, l(β) = β − log(3 exp(β) + 3) − log(3 exp(β) + 1) − log(2 exp(β) + 1). Kyuson Lim 11 / 25
  • 12. Example for computing Partial likelihood A partial likelihood is maximized to obtain for the estimate of β. plsimple - function(beta) { + psi - exp(beta) + result - log(psi) - log(3*psi + 3) - log(3*psi + 1) - log(2*psi + 1) + result } result - optim(par=0, fn = plsimple, method = L-BFGS-B, control=list(fnscale = -1), lower = -3, upper = 1) result$par [1] -1.326129 Maximum partial likelihood estimate by Newton-Rapshon algorithm The solid curved black line is a plot of the log partial likelihood over a range of values of β. The maximum is indicated by the vertical dashed blue line, and the value of the log-partial likelihood at a point is -3.672. The value -4.277 of the log-partial likelihood is at the null hypothesis value, β = 0. Kyuson Lim 12 / 25
  • 13. Penalize Partial Likelihood (PPL) Taking a log, random effect are treated as penalty term in GLM by the Best Linear Unbiased Prediction (BLUP) Maximization in PPL is a double iterative process, alternates between inner (lpart ) and outer loop (lpenalize) until convergence. A penalty term of random effect is far away from mean value 0, by reducing a penalized partial likelihood. If wi ∼ N(0, σ2 D) where D is known matrix, then BLUP consists of maximizing a sum of two log-likelihood: lPPL(θ, β, w) = lpart (β, w) − lpenalize(θ, w) lpart (β, w): conditional likelihood for data given frailties. lpenalize(θ, w): stands for the distribution for frailties. In lpart , a Newton-Raphson uses local quadratic approximations of penalty term. Iterate to estimate β and wi , using the derivative of likelihood and variance matrix, V. Kyuson Lim 13 / 25
  • 14. Newton-Raphson algorithm Originated from Taylor’s series f(x) ≈ f(xk ) + (x − xk )f0 (xk ) + 1 2! (x − xk )2 f00 (xk ) + · · · + 1 n! (x − xk )n f(n) (xk ), the system of non-linear equations is solved by the procedure of Newton-Raphson method. Approximate roots, f(β) = 0 1 Start with initial value β(0) of β. 2 First-order linear approximation of f at β(0) + h: f(β(0) + h) ≈ f(β(0) ) + hf0 (β(0) ) 3 Solve to find solution β(1) (updated) = β(0) + h of f(β) = 0 ⇒ f(β(1) ) = 0 by h = −{f0 (β(0) )}−1 f(β(0) ) and thus β(1) = β(0) − {f0 (β(0) )}−1 f(β(0) ) 4 Iterate until process converges β(k+1) ≈ β(k) . A GLM (poisson, logistic) uses the method of iteration for estimating the coefficients. A Newton-Raphson procedure converge if sufficient variation of measure risk variables exists within each patients. Kyuson Lim 14 / 25
  • 15. Newton-Raphson algorithm - Visual illustration Produces better approximations to the roots of a real-valued function. xn+1 = xn − f(xn) f0(xn) For example, when f(x) = x2 − a and f0 (x) = 2x, the initial guess is x0 = 10 and the difference is set to be small to iterate until convergence. x1 = x0 − f(x0) f0(x0) = 10 − 102 − 612 2 × 10 = 35.6 x2 = x1 − f(x1) f0(x1) = 35.6 − 35.62 − 612 2 × 35.6 = 26.395 x3 = · · · = 24.790 x4 = · · · = 24.7376 x5 = · · · = 24.738633753 A graph of Newton-Raphson method in quadratic formula Kyuson Lim 15 / 25
  • 16. Newton-Raphson iterative procedure With initial estimate of β0, w0, the goal is to iteratively estimate β with PPL. Log-likelihood is approximately quadratic in region of true values. Maximizing lpart − lpenalize gives estimators where a joint log-likelihood is lPPL, β̂ ŵ = β0 w0 + V−1 ∂lpart /∂β0 ∂lpart /∂w0 − V−1 0 σ−2w0 , V = −∂2lpart /∂β∂β0 −∂2lpart /∂β∂w0 −∂2lpart /∂β∂β0 −∂2lpart /∂w∂w0 + σ−2I The variance matrix V taken to be σ2 (I − M−1 ), 10 V = 0. β̂, ŵ has approximately a joint normal distribution with mean β, w with variance matrix V. Kyuson Lim 16 / 25
  • 17. Simulation study: Infections in Kidney Patient The data contains recurrence times to infection, at the point of insertion of the catheter, for kidney patients using portable dialysis equipment. Disease types are classified as 0 = GN, 1 = AN, 2 = PKD, 3 = other. A patient have two recurrence times given, as Infection occurs = 1 and censored = 0. A 5 regression variables are fitted with age, sex and presence or absence of disease type. The package used is ‘survival’ (p.55), where the data of the original paper is preserved for public access. Package of ‘ggsurvplot’ (survival plot), ‘ggforest’ (hazard ratio) is used to model and run model diagnostics. Kyuson Lim 17 / 25
  • 18. Simulation study: specified distribution The data of 76 patients for data(kidney) kfitm1 - coxph(Surv(time,status) ~ age + sex + disease + frailty(id, dist=’gauss’)) kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = gauss), data = kidney) coef se(coef) se2 Chisq DF p age 0.00489 0.01497 0.01059 0.10678 1.0 0.74384 sex -1.69728 0.46101 0.36170 13.55454 1.0 0.00023 diseaseGN 0.17986 0.54485 0.39273 0.10897 1.0 0.74131 diseaseAN 0.39294 0.54482 0.39816 0.52016 1.0 0.47077 diseasePKD -1.13631 0.82519 0.61728 1.89621 1.0 0.16850 frailty(id, dist = gauss 17.89195 12.1 0.12376 Iterations: 7 outer, 42 Newton-Raphson Variance of random effect= 0.493 Degrees of freedom for terms= 0.5 0.6 1.7 12.1 Likelihood ratio test=47.5 on 14.9 df, p=3e-05 n= 76, number of events= 58 The only regression coefficient with -1.697 that is significantly large compared to its standard error is that of the sex variable, indicating a lower infection rate for female patients. Kyuson Lim 18 / 25
  • 19. Simulation study: Infections in Kidney patients The estimate of σ2 = 0.3821. In general, the effect of the prior distribution on frailty terms is to shrink estimates toward the origin, which bias the estimate. kfit - coxph(Surv(time, status)~ age + sex + disease + frailty(id), kidney) kfit Iterations: 6 outer, 35 Newton-Raphson Variance of random effect= 5e-07 I-likelihood = -179.1 Degrees of freedom for terms= 1 1 3 0 Likelihood ratio test=17.6 on 5 df, p=0.003 n= 76, number of events= 58 round(kfit$coefficients, 3) age sex diseaseGN diseaseAN diseasePKD 0.003 -1.483 0.088 0.351 -1.431 Kyuson Lim 19 / 25
  • 20. Simulation study: Infections in Kidney patients Test the proportional hazards assumption for a Cox regression model fit (coxph). cox.zph(kfit) chisq df p age 0.105 1 0.746 sex 5.953 1 0.015 disease 1.985 3 0.576 GLOBAL 7.869 5 0.164 Figure: A graph of coefficient vs. time The plot gives an estimate of the time-dependent coefficient β(t). If the proportional hazards assumption holds then the true β(t) function would be a horizontal line, slope of 0. Kyuson Lim 20 / 25
  • 21. Simulation study: Linearity Martingale residuals: a discrepancy between the observed value of a subject’s failure indicator and its expected value, integrated over the time for which that patient was at risk. The martingale residuals are plotted against covariates to detect nonlinearity. Plots of martingale residuals and partial residuals are examined against the last two of covariates, age and sex. Smooths are produced by local linear regression (using the lowess function). There are no observed non-linearity. Kyuson Lim 21 / 25
  • 22. Simulation study: Influential points Comparing the magnitudes of the largest values to the regression coefficients suggests that 1 observation is influential individually. One of the males (id 21) is a large outlier, with much longer survival than his peers. If this observation is removed no evidence remains for a random subject effect. Kyuson Lim 22 / 25
  • 23. Cox proportional hazard model The predicted survival profiles for patients 5, and 12 is modeled. Predicted survival curves for three patients using the penalization Kyuson Lim 23 / 25
  • 24. Generalized gamma frailty model The paper presents a frailty model using the generalized gamma distribution as the frailty distribution, and lognormal, Weibull frailty model as special cases. Written by Dr. N. Balakrishnan, the BLUP method of this paper is addressed for modeling a new frailty model with generalized gamma distribution that has more parameters to be less parametric and more flexible. Instead of EM algorithm, the Newton-Raphson algorithm is applied to obtain the MLE of parameters. The use of generalized gamma distribution as the frailty distribution in a frailty model has substantially improved the goodness-of-fit of the frailty model. The model is particularly useful in reducing errors in frailty variance estimation. Also, the performance of the likelihood ratio test depends on the cluster size. Kyuson Lim 24 / 25
  • 25. References Regression with Frailty in Survival Analysis [C. A. McGilchrist and C. W. Aisbett] https://www.jstor.org/stable/2532138?casa_token=cxuDrkxyJzUAAAAA% 3AEnp4ejKDMHcBHgMbROgKulGAA-lUE0Iw16oVqCSqDXPbWGutHjuBeIJ7URMAZSIioGrZdBNLmqvx4fYUX_ 3D0LUaBnEGd-dVIBW88Bkm6vPgEhEca24seq=1#metadata_info_tab_contents. Generalized gamma frailty model [N. Balakrishnan and Yingwei Peng] https://pubmed.ncbi.nlm.nih.gov/16220516/ (R) Package ‘survival’ [Terry M Therneau, et. al] https://cran.r-project.org/web/packages/survival/survival.pdf Applied Survival Analysis Using R [Dirk F Moore] https://link.springer.com/book/10.1007/978-3-319-31245-3 Thank you for the participation and understandings ! Kyuson Lim 25 / 25