Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH5916:

Survival Analysis

Term 1 2022

Partial Solutions

Week 1

1.   (a)     ❼ Time origin: time of heart attack ❼ Time scale: calendar time

❼ Endpoint: death

(b)     ❼ Left truncation:  patients who die before reaching the heart attack ward for

treatment will be excluded from the study.

❼ Right censoring: for patients who survive beyond the end of follow-up (which

might, for example, be when they are discharged from hospital), we only know their survival time exceeds the period from heart attack to end of follow-up. Also if the study is only interested in death related to the heart attack, then deaths from another cause would generate right-censored observations.

2. Design 1: simple type I right censoring at 20 years

Design 2: marriages not ending in divorce are right truncated

3.   (a)  S(t) = e λt (b)  h(t) = λ

(c)  H(t) = λt

4.   (a) E(T0j) =  and E(T1j) =

(b)  h0 (t) = λ and h1 (t) = λβ , β is the hazard ratio

(c)

n0                             n1

L(λ,β) =      λeλt0j             λβeλβt1j

j=1                  j=1

(d)

βˆ(λˆ)  =   n(n)t111(0)j(j)  

I(λ,β) =  n01        1β12 

Asymptotically normal with mean (λ,β)′  and variance matrix I1(λ,β)


Week 2

1.   (a) Left truncation implies individuals survive up to a certain point after their time origin, say, Ti  > vi . Therefore, the contributions to the likelihood for uncensored and right censored individuals is

L =      f(ti |Ti  > vi )      S(ti |Ti  > vi )

U                                    C

U  C

(b) Assuming left truncation such that Ti  > vi  is given, the MLE for λ is

 =         d        

 i (ti  vi )

2. Basic ideas given in lecture, use delta method for variance in part (c)

3.   (a) interval censoring for women who developed breast cancer, right censoring for those that did not

(b)

4                                           8

L =      (S(tS(tui ))      S(ti )

i=1                                      i=5

= (eλ55 eλ56)(eλ58 eλ59)(eλ52 eλ53)(eλ59 eλ60)(eλ60)4

 

4.   (a)  0  = 0.01123596,se(0 ) = 0.002808989, and 1  = 0.004564315,se(1 ) = 0.001376193

(b) For treatment group 0, the CIs are

Method                     lower CL       upper CL

 

Exact

0.006422319

0.017373749

Asymptotic

0.005730337

0.016741573

Likelihood ratio

0.006577653

0.01766719

(c) Using the exact interval above for 0 , the median survival is 61.6901 (95% CI: 39.89623, 107.92786)

(d) For treatment group 0, median survival is 61.6901 (95% CI: 37.79298, 100.6977)

5.   (a)   = 0.2078368,se() = 0.02399893 (b) same as part (a),  = 0.2078368

(c) with no left truncation,  = 0.1721407


Week 3

1. The Weibull has S(t) = exp(−λtγ )

(a) Letting 1 − S(tα ) = 1 − exp(−λ(tα )γ ) and solving for tα  will give the result (b) Letting tα  = λ1/γ  and solving for α gives 1 − 1/e

(c) θˆ = 33.766 and

var γˆ(θˆ)  = 

2.  Starting from the hint for using h(t|V) = ρ0 + ρ2 V , the individual survival function is S(t|V) = e (ρ0 +ρ2V)t

which has population survival function

S(t) = eρ0 tE(eρ2Vt) = eρ0 t MV (−ρ2t)

for MV  the moment generating function of V . The population hazard is then

d

dt

ρ0 −     (MV (−ρ2t))

 

and equating this to the Gompertz-Makeham hazard gives

MV (t) = exp   (et − 1)

which is the moment generating function for a Poisson with parameter ρ 1 /ρ2

3. If done correctly, your plot should look similar to

 

 

 


Week 4

1.   (a) Input data and use survfit function, or compute manually (b) From fit model  = 2.736, so (t) = exp(−exp(−2.736)t);

(c) KM: se( (10)) = 0.144; Exp:  se( (10)) = 0.12812 (hint:  derive delta method variance for transformation S(10) = e10λ)

(d) –

 

 


(tℓ ) = j:tℓ     =  × · · ·2.   (a) Write out

and then simplify

(b) Write out relationship:

vaˆr( (t ))       vaˆr( (t1))       1 − (t)       1 − (t1)

(t)2       −     (t1)2        =   n (t)   −   (t1)

vaˆr( (t1))       vaˆr( (t2))       1 − (t1)       1 − (t2)

(t1)2       −     (t2)2        =   n (t1)   −   (t2)

 

 

finishing at t0 . Then add up terms and simplify.

(c) P(T < 12) = 1 − (11) = 1 −  =  and

var(1 (11)) = var( (11)) =  =  = 0.009718173


(c)  X2  = 2.17,p = 0.14, extra Weibull parameter does not improve fit significantly

(d) –

 

 


 

Strata   +  0   +  1   +  treat=0   +  treat=1

 



 

(f)  Similar to above, just specify dist  =  ‘lognormal’ and dist  =  ‘extreme’ (g) Fit the usual way, for example, the log-normal would be:

> hep .lnorm  <-  survreg(Surv(smonths,  event)  ~  treat,

data  = hepdat,  dist  =  "lognormal")

> predict(hep .lnorm,  data .frame(treat  =  c(0,  1)),

type  =  "quantile", p  =  0 .5)

1                 2

47.09753  164.31348

(h)  X2  = 4.7,p = 0.03

4.   (a) –

Strata   +  drug=1   +  drug=2


 


(b)  X2  = 0.1,p = 0.7

(c) will need to make stage a factor variable first

 

Strata   +  factor(stage)=1   +  factor(stage)=2   +  factor(stage)=3   +  factor(stage)=4

 

 

 

0                               1000                            2000                            3000                            4000                            5000

Time

(d)  X2  = 70.1,df = 3,p < 0.0001


Week 5

1.  Since the KM estimate is a step function and t = 26 occurs between event times, i.e., within [19, 30), the estimates are

(26) = (1 − 1/18)(1 − 1/15) = 0.881

var( (26)) = (0.881)2     ·   = (0.0790)2

2.   (a) For ψi  = exp(xi(T)β)

ψ 1                                                 ψ3                                ψ4                   ψ6


 

3.   (a)


 

exp(9β) + exp(10β) + exp(5β) + exp(6β) + exp(3β) + exp(4β)

 

exp(5β) + exp(6β) + exp(3β) + exp(4β)

exp(6β)                         

×

 

exp(5β) + exp(6β) + exp(3β) + exp(4β)

 

(b)  Similar to Breslow but discount“ the denominator for ties

(c)  Since there are 3 ties, there are 3! = 6 unique orderings and so there are 6 terms in the partial likelihood