Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

PRACTICAL 1

QUESTION: The folllowing shows survival diagnosis of cancer of the cervix uteri cases initially
diagnosed 1942-1954. Compute and plot estimated survival function, death density
function and hazard function.

Number
Number Alive at Dying in
Year of the Beginning of the
follow-up the Interval Interval
0-1 5982 1952
1-2 4030 1185
2-3 2845 728
3-4 2117 544
4-5 1573 397
5-6 1176 315
6-7 861 201
7-8 660 186
8-9 474 130
9-10 344 99
10-11 245 87
11-12 158 86
12-13 72 30
13-14 42 15
14-15 27 10

OBJECTIVE: To estimate and plot survival function, death density function and hazard function
for data of the cervix uteri cases initially diagnosed 1942-1954.

THEORY:- In the given data, there is no censoring so we are using direct method for estimation.

Survival Function:
This function denoted by S(t) is defined as S(t) = Plan individual survives longer than
t)
⟹ Ŝ(t) = Number of patients surviving longer than t/Total number of patients

Death Density Function:


It can be expressed as
f(t) = lim(Δt⟶∞) P[an individual dying in the interval (t,t+Δt)]/Δt
ḟ(t) = number of patients dying in the interval beginning at time t/(Total number of
patients)(interval width)
Hazard Function:
The hazard function h(t) of survival time T gives the conditional failure rate.
h(t) or λ(t) = lim(Δt⟶0) P[an individual fails in the time interval (t,t+Δt) given the
individual has survived to t]/Δt
ĥ(t) = number of patients dying per unit time in the interval/(number of patients
surviving at t)- (number of deaths in the interval)/2

CALCULATIONS:
Number
Number Alive at Dying in
Year of the Beginning of the
follow-up the Interval Interval Ŝ(t) fˆ(t) ĥ(t)
0-1 5982 1952 1 0.326312 0.389932
1-2 4030 1185 0.673688 0.198094 0.344727
2-3 2845 728 0.475593 0.121698 0.29343
3-4 2117 544 0.353895 0.090939 0.294851
4-5 1573 397 0.262956 0.066366 0.288832
5-6 1176 315 0.19659 0.052658 0.309278
6-7 861 201 0.143932 0.033601 0.2643
7-8 660 186 0.110331 0.031093 0.328042
8-9 474 130 0.079238 0.021732 0.317848
9-10 344 99 0.057506 0.01655 0.336163
10-11 245 87 0.040956 0.014544 0.431762
11-12 158 86 0.026413 0.014376 0.747826
12-13 72 30 0.012036 0.005015 0.526316
13-14 42 15 0.007021 0.002508 0.434783
14-15 27 10 0.004514 0.001672 0.454545

GRAPHS:

Survivorship Function, Ŝ(t)


1.2

0.8

0.6
Ŝ(t)
0.4

0.2

Graph of Ŝ(t) against time

Death Density Function, f̂(t)


Death Density Function, f̂(t)
0.35
0.3
0.25
0.2
0.15 fˆ(t)
0.1
0.05
0

Graph of f̂(t) against time

Hazard Function, ĥ(t)


0.8
0.7
0.6
0.5
0.4
0.3 ĥ(t)
0.2
0.1
0

Graph of ĥ(t) against time

RESULT: The survivorship function, the death density function and the hazard function have
been plotted.
PRACTICAL 2
QUESTION: The following data represents the survival time in days of 10 patients with advance lung
cancer and the study is terminated at particular point of time. Obtain an estimate of mean
survival time and variance of the estimate of mean survival time when assumed to follow
exponential distribution.

Patient number Survival time in Censoring time


days (tᵢ)
1 2 81
2 - 72
3 51 70
4 - 60
5 33 41
6 27 31
7 14 31
8 24 30
9 4 29
10 - 21

THEORY:-
Mean survival time is the expected value of the survival time.
μ = E(T) =Σt.f(t) or ∫t.f(t)dt
= ΣS(t) or ∫S(t)dt

The mean survival time is defined only if all subjects eventually fail. This might not be the case
if, for example, the survival outcome is time to cancer recurrence, and some fraction c of the
subjects are cured and thus have no recurrence. In that case the area under the survival curve
is infinite. In theory the mean survival also cannot be computed with the Kaplan-Meier
survival curve when the curve does not reach zero. If a mean survival time is required in this
situation, a work-around is to specify a maximum possible survival time, so that the integral
becomes finite.

Let us define δᵢ as(0,Tᵢ)


δᵢ = 1 ; if ith individual dies in 0 ≤ tᵢ ≤ Tᵢ
= 0 ; if ith individual dies beyond Tᵢ

μ = [Σδᵢtᵢ +(1 - δᵢ)Tᵢ]/Σδᵢ

The variance of the estimate of mean survival time when assumed to follow exponential
distribution is
Var(μ̂) = μ²/Σ[1- exp(-λTᵢ)]
CALCULATIONS:

The table changes as follows:

Patient number Survival time in Censoring time


days (tᵢ) δᵢ δᵢtᵢ 1 - exp(-λTᵢ)
1 2 81 1 2 0.84132689
2 - 72 0 0 0.80531329
3 51 70 1 51 0.79625969
4 - 60 0 0 0.74427084
5 33 41 1 33 0.60616301
6 27 31 1 27 0.50566678
7 14 31 1 14 0.50566678
8 24 30 1 24 0.49430329
9 4 29 1 4 0.48267859
10 - 21 0 0 0.37952671

μ̂ 44

λ̂ 0.022727273

Var(μ̂) 457.4598897

RESULT:-
The estimate of mean survival time is μ̂ = 44.
The variance of the estimate of mean survival time when assumed to follow exponential
distribution is 457.459.
PRACTICAL 3(a)
QUESTION: In a study of efficiency of a new drug 12 patients with tumor are given this drug.
The experimenter decides to terminate the study after a patients died. The
survivor time in weeks are as follows: 5, 8, 9, 10, 12,
15, 20, 21, 25, 25+, 25+, 25+
Assuming that this survivor times follows negative exponential distribution,
estimate
(i) Mean survival time.
(ii) Survival rate.
(iii) Variance of the estimate of mean survival time.

THEORY:

TYPE II CENSORING

If survival time follows negative exponential distribution 𝑓(𝑡)=λ𝑒^(−λ𝑡) λ>0 , 𝑡>0


Suppose n individuals enters the study at the same time and the study is terminated as soon as dth
individual died(uncensored) where d<n.

Let t1,t2,…,tn be random variable denoting the actual life time of n independent experimental units.
Since study is terminated after dth individual dies
We have observations as 𝑡_((1))≤𝑡_((2))≤…≤𝑡_((𝑑)) (Order statistics)

Then

1. Mean Survival time (μ̂) μ̂ = (∑𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))+(𝑛−𝑑+1)𝑡_((𝑑)) 〗)/𝑑


2. Survival Rate (λ )̂ λ̂ = 𝑑/(∑(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))+(𝑛−𝑑+1)𝑡_((𝑑)) 〗)
OR λ̂ = 1

3. Variance of the estimate of mean survival time V(μ̂) = μ̂²/d

CALCULATION

DATA:

5 8 9 10 12 15
20 21 25 25+ 25+ 25+
i Survival Time[t(i)]
1 5
2 8
3 9
4 10
5 12
6 15
7 20
8 21
9 25
10 25+
11 25+
12 25+

Type 2 Censoring

No of deaths after which study is terminated


d 9
n 12
t(d) 25
t(d-1)= t(8) 21

∑_(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))=〗 ∑_(𝑖=1)^8▒𝑡_((𝑖)) 100

1. Mean Survival time μ̂

μ̂= (∑(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))+(𝑛−𝑑+1)𝑡_((𝑑)) 〗)/𝑑


μ̂ = 22.22222 ≈22.22

2. Survival Rate λ̂ λ̂ = 1/μ̂ 0.045

3. Variance of the estimate of mean survival time V(μ̂) = 54.8696845

RESULT:

1. Mean Survival time μ̂ 22.22222 ≈22

2. Survival Rate λ̂ = 0.045

3. Variance of the estimate of mean survival time V(μ̂) = 54.86968


PRACTICAL 3(b)
QUESTION:
Consider an experiment with 35 animals, the following data are lifetimes in weeks of
these animals. The study is terminated when 31 animals have died estimate:
(i) Mean survival time
(ii) Survival rate
(iii) Variance of the estimate of mean survival time.

THEORY:
TYPE II CENSORING

If Survivor times follows negative exponential distribution 𝑓(𝑡)=λ𝑒^(−λ𝑡) λ>0 , t>0


Suppose n individuals enters the study at the same time and the study is terminated as soon as dth individual
died(uncensored) where d<n.
Let t1,t2,…,tn be random variable denoting the actual life time of n independent experimental units
Since study is terminated after dth individual dies

We have observations as 𝑡_((1))≤𝑡_((2))≤…≤𝑡_((𝑑)) (Order statistics)

Then

1. Mean Survival time μ̂


μ̂ = (∑(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))+(𝑛−𝑑+1)𝑡_((𝑑)) 〗)/𝑑
2. Survival Rate λ̂
λ̂ = 𝑑/(∑2_(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))+(𝑛−𝑑+1)𝑡_((𝑑)) 〗)
OR λ̂ = 1

3. Variance of the estimate of mean survival time V(μ̂) = μ̂²/d

CALCULATIONS:

DATA:

3 4 5 6 6 7 8
8 9 9 9 10 10 11
11 11 13 13 13 13 13
17 17 19 19 25 29 33
42 42 52 52+ 52+ 52+ 52+
i Survival Time[t(i)]
1 3
2 4
3 5
4 6
5 6
6 7
7 8
8 8
9 9
10 9
11 9
12 10
13 10
14 11
15 11
16 11
17 13
18 13
19 13
20 13
21 13
22 17
23 17
24 19
25 19
26 25
27 29
28 33
29 42
30 42
31 52
32 52+
33 52+
34 52+
35 52+

TYPE II CENSORING

No of deaths after which study is terminated


d 31
n 35
t(d)=t(31) 52
t(d-1)= t(30) 42

∑_(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))=〗 ∑_(𝑖=1)^30▒𝑡_((𝑖)) 435


∑_(𝑖=1)^(𝑑−1)▒〖𝑡_((𝑖))=〗 ∑_(𝑖=1)^30▒𝑡_((𝑖))
1. Mean Survival time

μ̂ 22.41935484 ≈23

2. Survival Rate λ̂ 0.044604

3. Variance of the estimate of mean survival time

V(μ̂ ) 16.2137894

RESULT

1. Mean Survival time μ̂ 22.419355 ≈23

2. Survival Rate λ̂ 0.0446043

3. Variance of the estimate of mean survival time V(μ̂ ) 16.21379


PRACTICAL 4
AIM: The following data gives the survival time of female patients with fever. Perform the life table
analysis to compute and plot the three survival function for the following data. Also obtain the
variance of survivorship function.

Years after No. of patients No. of patients No. of patients lost No. of alive
diagnosis alive at the died during the due to patients
beginning of interval (dᵢ) follow up (lᵢ) withdrawn from
interval (nᵢ) the process (wᵢ)
0-1 126 47 4 15
1-2 60 5 6 11
2-3 38 2 0 15
3-4 21 2 2 7
4-5 10 0 0 6

THEORY: Life table method / Acturial Method


The survival probability can be decomposed into products of probabilities as:

Ŝ(τ_𝑘)=𝑝_𝑘.𝑝_(𝑘−1)…… 𝑝_1
=∏26_(𝑖=1)^𝑘▒𝑝_𝑖

=∏26_(𝑖=1)^𝑘▒〖1−𝑞_𝑖 〗

𝑆 ̂(τ_𝑘 )=∏26_(𝑖=1)^𝑘▒(1−𝑑_𝑖/𝑛_𝑖′)

where,
𝑛_𝑖′=𝑛_𝑖−(𝑙_𝑖+𝑤_𝑖)/2

(2) The death density function is given as:

f(t) = (𝑆(𝑍_(𝑘−1) )−𝑆(𝑍_𝑘 ))/(𝐼𝑛𝑡𝑒𝑟𝑣𝑎𝑙 𝑤𝑖𝑑𝑡ℎ)


where f(0) = 1 - S(0)

(3) The hazard function is defined as:


h(t) = f(t)/S(t)

(4) The variance of survivorship function is given as:

V(𝑆(𝑍_𝑘 ))=[𝑆(𝑍_𝑘 )]^2∗∑26_(𝑖=1)^𝑘▒𝑑𝑖/𝑛𝑖′(𝑛𝑖^′−𝑑𝑖)


V(𝑆(𝑍_𝑘 ))=[𝑆(𝑍_𝑘 )]^2∗∑26_(𝑖=1)^𝑘▒𝑑𝑖/𝑛𝑖′(𝑛𝑖^′−𝑑𝑖)

CALCULATIONS:
LIFE TABLE ANALYSIS

Years
after nᵢ dᵢ lᵢ wᵢ nᵢ'
diagnosis
0-1 126 47 4 15 116.5
1-2 60 5 6 11 51.5
2-3 38 2 0 15 30.5
3-4 21 2 2 7 16.5
4-5 10 0 0 6 7

Fᵢ' Ŝ(τk ) f(t) h(t) dᵢ/(nᵢ'*(nᵢ'-dᵢ)) V(S(Zk))


0.596567 0.596566524 0.403433476 0.676258993 0.005804798 0.002065879
0.902913 0.538647444 0.05791908 0.107526882 0.002087901 0.002289996
0.934426 0.5033263 0.035321144 0.070175439 0.002300834 0.002582403
0.878788 0.442317051 0.061009248 0.137931034 0.008359457 0.003629788
1 0.442317051 0 0.003629788

Survivorship Function, Ŝ(tk)


0.7

0.6

0.5

0.4
S(Tk)
0.3

0.2

0.1

0
1 2 3 4 5
Death density function, f(t)
0.45
0.4
0.35
0.3
0.25
0.2 f(t)
0.15
0.1
0.05
0
1 2 3 4

Hazard Function, h(t)


0.8
0.7
0.6
0.5
0.4
h(t)
0.3
0.2
0.1
0
1 2 3 4

RESULT:
Survival Probabilities, Death density function and Hazard function is calculated and plotted above.
Variance of survivorship function is : 0.002065879
0.002289996
0.002582403
0.003629788
0.003629788
PRACTICAL 5
AIM: Consider the survival time of 30 pneumonia patients given below:
Treatment Survival Treatment Survival Time
received Time received
1 33.7+ 2 16+
1 3.9 2 6.9
1 10.5 2 11+
1 5.4 2 29.8
1 19.5 2 23
1 23.8+ 2 8.3
1 7.9 2 12.2+
1 10.9 2 12.5
1 16.6+ 2 24.4
1 33.7+ 2 7.7
1 17.1+ 2 14.8+
1 16.9 2 8.2+
2 20.9+ 2 8.2
2 21.4 2 7.8+
2 18.1+ 2 8

1) Compute and plot the PL estimators of the survivorship function of the 2 treatments groups.
2) Compute the variance of survivorship function.
3) Estimate the mean survival time of the 2 groups.

THEORY: Steps to calculate KMPL estimate are:


1) Arrange all the survival time in ascending order.
2) The 2nd column labelled ‘i’ consists of corresponding ranks of each observation in column
1.
3) The 3rd column labelled ‘r’ pertains the uncensored observations only when r=i if the
observation is uncensored.
4) Compute (n -r )/( n - r + 1) for every uncensored observation.
5) The survivorship function is calculated as:
Ŝ(t) =∏(𝑛−𝑟)/(𝑛−𝑟+1)

6) The variance of survivorship function is calculated as:


V[ Ŝ(𝑡)]=[ Ŝ(t)]²∗∑1/((𝑛−𝑟)∗(𝑛−𝑟+1))

7) Mean survival time


μ̂=∫ Ŝ(𝑡).𝑑𝑡
CALCULATIONS:

Treatmen Survival Time Treatment Survival


t received received Time
T₁ T₂
1 33.7+ 2 16+ 33.7+ 20.9+
1 3.9 2 6.9 3.9 21.4
1 10.5 2 11+ 10.5 18.1+
1 5.4 2 29.8 5.4 16+
1 19.5 2 23 19.5 6.9
1 23.8+ 2 8.3 23.8+ 11+
1 7.9 2 12.2+ 7.9 29.8
1 10.9 2 12.5 10.9 23
1 16.6+ 2 24.4 16.6+ 8.3
1 33.7+ 2 7.7 33.7+ 12.2+
1 17.1+ 2 14.8+ 17.1+ 12.5
1 16.9 2 8.2+ 16.9 24.4
2 20.9+ 2 8.2 7.7
2 21.4 2 7.8+ 14.8+
2 18.1+ 2 8 8.2+
8.2
7.8+
8

T₁ i r (n-r)/(n-r+1) S(t) 1/(n-r)*(n-r+1) V(S(t))


3.9 1 1 0.91666667 0.916666667 0.007575758 0.006365741
5.4 2 2 0.90909091 0.833333333 0.009090909 0.011574074
7.9 3 3 0.9 0.75 0.011111111 0.015625
10.5 4 4 0.88888889 0.666666667 0.013888889 0.018518519
10.9 5 5 0.875 0.583333333 0.017857143 0.02025463
16.9 7 7 0.83333333 0.486111111 0.033333333 0.021942515
19.5 9 9 0.75 0.364583333 0.083333333 0.023419416
16.6+ 6 - - - -
17.1+ 8 - - - -
23.8+ 10 - - - -
33.7+ 11 - - - -
33.7+ 12 - - - -

μ̂₁= 12.53125 13
T₂ i r (n-r)/(n-r+1) S(t) 1/(n-r)*(n-r+1) V(S(t))
6.9 1 1 0.94444444 0.944444444 0.003267974 0.002914952
7.7 2 2 0.94117647 0.888888889 0.003676471 0.005486968
8 4 4 0.93333333 0.82962963 0.004761905 0.008057308
8.2 5 5 0.92857143 0.77037037 0.005494505 0.0102082
8.3 7 7 0.91666667 0.70617284 0.007575758 0.012355603
12.5 10 10 0.88888889 0.627709191 0.013888889 0.015234935
21.4 15 15 0.75 0.470781893 0.083333333 0.027039284
23 16 16 0.66666667 0.313854595 0.166666667 0.028434911
24.4 17 17 0.5 0.156927298 0.5 0.019421816
29.8 18 18 0 0 -
7.8+ 3 - - - -
8.2+ 6 - - - -
11+ 8 - - - -
12.2+ 9 - - - -
14.8+ 11 - - - -
16+ 12 - - - -
18.1+ 13 - - - -
20.9+ 14 - - - -

μ̂₂= 15.249561 15

RESULT: PL Estimates of both T₁ and T₂ is plotted below.

Mean survival time for


T₁ μ̂= 12.53125 13
T₂ μ̂= 15.249561 15

Variance of survivorship function for both the group is


For T₁ For T₂
V(S(t)) V(S(t))
0.006365741 0.00291495
0.011574074 0.00548697
0.015625 0.00805731
0.018518519 0.0102082
0.02025463 0.0123556
0.021942515 0.01523494
0.023419416 0.02703928
0.02843491
0.01942182
S(t) v/s T₁
1

0.8

0.6

0.4 S(t)

0.2

0
3.9 5.4 7.9 10.5 10.9 16.9 19.5

S(t) v/s T₂
1
0.9
0.8
0.7
0.6
0.5
S(t)
0.4
0.3
0.2
0.1
0
6.9 7.7 8 8.2 8.3 12.5 21.4 23 24.4 29.8
PRACTICAL 6
QUESTION: Consider a clinical trial in which 10 lung cancer patients are followed to death. Compute
Survivorship probabilities and median survival time.
4 5 6 8 8
t
8 10 10 11 12
THEORY:

Survivorship Function, S(t) is given by (Ŝ(t)) = (n-i)/n = 1 - i/n


If same survival time occurs in more than one than use minimum value of Ŝ(t).

Estimate of median time can be obtained by using linear interpolation

t Ŝ(t)
m+1 a
m 0.5
m-1 b

We wil get equation


[(m+1) - (m-1)]/(a-b) = [(m+1) - m]/(a-0.5)

Here a and b are the values of Ŝ(t) less than and greater than 0.5 respectively . (m+1) and (m-1) are
corresponding values of t for a and b.

CALCULATIONS:

DATA

4 5 6 8 8
t
8 10 10 11 12

t i 1-(i/n) Ŝ(t)
4 1 0.9 0.9
5 2 0.8 0.8
6 3 0.7 0.7
8 4 0.6 0.6
8 5 0.5 0.5
8 6 0.4 0.4
10 7 0.3 0.3
10 8 0.2 0.2
11 9 0.1 0.1
12 10 0 0
if same survival time occured in more than one than use minimum

n 10

For median , m
6 0.7
m 0.5
8 0.4

On solving

m 7.333333 ≈8

If same survival time occurs in more than one than use minimum value of Ŝ(t).

RESULT
Survivorship function, Ŝ(t) is calculated above and its plotted graph is as shown below.
Median value is 8.

SURVIVORSHIP FUNCTION, Ŝ(T)


1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
1 2 3 4 5 6 7 8 9 10
PRACTICAL 7
QUESTION:
Suppose that the following remission durations are observed from 10 patients with solid
tumours. Six patients relapse at 3.0, 6.5, 6.5, 10, 12 and 15 months, 1 patient is lost due to
follow up at 8.4 months and 3 patients are still in remission at the end of study after 4.0,
5.7 and 10 months. Calculate the survivorship function and the median remission time.

THEORY:
Steps to calculate KMPL estimate are:
1) Arrange all the survival time in ascending order.
2) The 2nd column labelled ‘i’ consists of corresponding ranks of each observation in
column 1.
3) The 3rd column labelled ‘r’ pertains the uncensored observations only when r=i if the
observation is uncensored.
4) Compute (n -r )/( n - r + 1) for every uncensored observation.
5) The survivorship function is calculated as:

6) The variance of survivorship function is calculated as:

7) Mean survival time

To get median survival time we will use interpolation


In the presence of censored survival times the median survival is estimated by first
calculating the Kaplan-Meier survival curve, then finding the value of M that satisfies the
equation S(M) = 0.5 This can be done by extending a horizontal line from S(t) = 0.5 (or
50%) on the vertical axis of the K-M survival curve, until the actual curve is met, then
moving vertically down from that point to cut the horizontal time axis at M, the median
survival time.
CALCULATIONS:

Pᵢ Ŝ(t) for
Survival time(t) i r (n-r)/(n-r+1) Ŝ(t) uncensored observations
3 1 1 0.9 0.9 t Ŝ(t)
4+ 2 3 0.9
5.7+ 3 6.5 0.771428571
6.5 4 4 0.857142857 0.771429 6.5 0.642857143
6.5 5 5 0.833333333 0.642857 10 0.482142857
8.4+ 6 12 0.241071429
10 7 7 0.75 0.482143
10+ 8
12 9 9 0.5 0.241071
15 10 10 0 0

Taking minimum Ŝ(t)

t Ŝ(t)
3 0.9
6.5 0.6428571
10 0.4821429
12 0.2410714

6.5 0.6428571
M 0.5
10 0.4821429

(10-M)/(0.4821429-0.5) = (M-6.5)/(0.5-0.6428571)

M 9.6111 ≈10

RESULT:
Survivorship function, Ŝ(t) is calculated above and its plotted graph is as shown below.
Median value is 10.

SURVIVAL CURVE
1

0.8

0.6

0.4

0.2

0
3 6.5 10 12
3 6.5 10 12
PRACTICAL 8
QUESTION: The following data were obtained on survival (in monthes) of male and female liver cancer
patients over a 20-month period after the diagnosis of the disease. The right censored
observations are denoted by a +.
S. No. Male Female
1 5 6
2 6+ 7
3 10 12+
4 14 15
5 15 16+
6 20+ 18
7 15 17+
8 18 15
9 8 13
10 7 19
11 15+ 20+
12 16 17
13 18+ 19
14 13 10+
15 12 14

(i) Compute the K-M survival function for each sex, and plot the survival curves.
(ii) Determine the median survival duration and standard error for both the groups.

THEORY:
Steps to calculate KMPL estimate are:
1) Arrange all the survival time in ascending order.
2) The 2nd column labelled ‘i’ consists of corresponding ranks of each observation in
column 1.
3) The 3rd column labelled ‘r’ pertains the uncensored observations only when r=i if the
observation is uncensored.
4) Compute (n -r )/( n - r + 1) for every uncensored observation.
5) The survivorship function is calculated as:

6) The variance of survivorship function is calculated as:


7) Mean survival time

To get median survival time we will use interpolation


In the presence of censored survival times the median survival is estimated by first calculating the Kaplan-
Meier survival curve, then finding the value of M that satisfies the equation S(M) = 0.5 This can be done by
extending a horizontal line from S(t) = 0.5 (or 50%) on the vertical axis of the K-M survival curve, until the
actual curve is met, then moving vertically down from that point to cut the horizontal time axis at M, the
median survival time.

CALCULATIONS
MALES
Pᵢ
Survival Time(t) i r (n-r)/(n-r+1) Ŝ(t) 1/(n-i)*(n-i+1) V(Ŝ(t)) SE(Ŝ(t))
5 1 1 0.93333333 0.933333333 0.004761905 0.00414815 0.064406
6+ 2
7 3 3 0.92307692 0.861538462 0.006410256 0.00829252 0.091063
8 4 4 0.91666667 0.78974359 0.007575758 0.01169298 0.108134
10 5 5 0.90909091 0.717948718 0.009090909 0.01434953 0.11979
12 6 6 0.9 0.646153846 0.011111111 0.01626218 0.127523
13 7 7 0.88888889 0.574358974 0.013888889 0.01743091 0.132026
14 8 8 0.875 0.502564103 0.017857143 0.01785573 0.133625
15 9 9 0.85714286 0.430769231 0.023809524 0.01753664 0.132426
15 10 10 0.83333333 0.358974359 0.033333333 0.01647364 0.12835
15+ 11
16 12 12 0.75 0.269230769 0.083333333 0.01530686 0.123721
18 13 13 0.66666667 0.179487179 0.166666667 0.01217232 0.110328
18+ 14
20+ 15

Ŝ(t) for Taking minimum Ŝ(t)


uncensored observations
t Ŝ(t) t Ŝ(t)
5 0.9 5 0.9
7 0.861538 7 0.86153846
8 0.789744 8 0.78974359
10 0.717949 10 0.71794872
12 0.646154 12 0.64615385
13 0.574359 13 0.57435897
14 0.502564 14 0.5025641
15 0.425247 15 0.359824
15 0.359824 16 0.269868
16 0.269868 18 0.179912
18 0.179912
14 0.502564
M 0.5
15 0.359824

M 14.01796 ≈14

FEMALES
Survival Time i r (n-r)/(n-r+1) Ŝ(t) 1/(n-i)*(n-i+1) V(Ŝ(t)) SE(Ŝ(t))
6 1 1 0.93333333 0.933333333 0.004761905 0.00414815 0.064406
7 2 2 0.92857143 0.866666667 0.005494505 0.0077037 0.087771
10+ 3
12+ 4
13 5 5 0.90909091 0.787878788 0.009090909 0.01200991 0.10959
14 6 6 0.9 0.709090909 0.011111111 0.0153148 0.123753
15 7 7 0.88888889 0.63030303 0.013888889 0.01761839 0.132734
15 8 8 0.875 0.551515152 0.017857143 0.01892067 0.137552
16+ 9 9
17 10 10 0.83333333 0.45959596 0.033333333 0.0201803 0.142057
17+ 11
18 12 12 0.75 0.34469697 0.083333333 0.02125275 0.145783
19 13 13 0.66666667 0.22979798 0.166666667 0.01824685 0.135081
19 14 14 0.5 0.11489899 0.500000000 0.0111626 0.105653
20+ 15 15 0 0

Ŝ(t) for Taking minimum Ŝ(t)


uncensored observations
t Ŝ(t) t Ŝ(t)
6 0.933333 6 0.9
7 0.866667 7 0.83571429
13 0.787879 13 0.75974026
14 0.709091 14 0.68376623
15 0.630303 15 0.55151515
15 0.551515 17 0.45959596
17 0.459596 18 0.33271497
18 0.344697 19 0.11977739
19 0.229798
19 0.114899

15 0.551515
M 0.5
17 0.459596

M 15.72909 ≈15
RESULTS:
Survivorship function, Ŝ(t) and the standard error of the survivorship functions are calculated above and its
plotted graphs for both males and females is as shown below.
Median value is 14 for males and for that of females is 15.

For males
SURVIVAL CURVE

1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
5 7 8 10 12 13 14 15 16 18

For females
SURVIVAL CURVE

1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
6 7 13 14 15 17 18 19
PRACTICAL 9
QUESTION: The ordered survival times of 24 patients with Dukes’ C colorectal cancer as 3+, 6, 6,
6, 6, 8, 8, 12, 12,12+, 15+, 16+, 18+, 18+, 20, 22+, 24, 28+, 28+, 28+, 30, 30+, 33+ and 42
months. Calculate the Kaplan-Meier (K-M) survival curve - patients with colorectal cancer
and also median survival time.

THEORY:
Steps to calculate KMPL estimate are:
1) Arrange all the survival time in ascending order.
2) The 2nd column labelled ‘i’ consists of corresponding ranks of each observation in
column 1.
3) The 3rd column labelled ‘r’ pertains the uncensored observations only when r=i if the
observation is uncensored.
4) Compute (n -r )/( n - r + 1) for every uncensored observation.
5) The survivorship function is calculated as:

6) The variance of survivorship function is calculated as:

7) Mean survival time

To get median survival time we will use interpolation


In the presence of censored survival times the median survival is estimated by first
calculating the Kaplan-Meier survival curve, then finding the value of M that satisfies the
equation S(M) = 0.5 This can be done by extending a horizontal line from S(t) = 0.5 (or 50%)
on the vertical axis of the K-M survival curve, until the actual curve is met, then moving
vertically down from that point to cut the horizontal time axis at M, the median survival
time.
CALCULATIONS:

Pᵢ
Survival Time i r (n-r)/(n-r+1) Ŝ(t)
3+
6 1 1 0.956521739 1
6 2 2 0.954545455 0.91304348
6 3 3 0.952380952 0.86956522
6 4 4 0.95 0.82608696
8 5 5 0.947368421 0.7826087
8 6 6 0.944444444 0.73913043
12 7 7 0.941176471 0.69565217
12 8 8 0.9375 0.65217391
12+ 9
15+ 10
16+ 11
18+ 12
18+ 13
20 14 14 0.9 0.58695652
22+ 15
24 16 16 0.875 0.51358696
28+ 17
28+ 18
28+ 19
30 20 20 0.75 0.38519022
30+ 21
33+ 22
42 23 23 0 0

Ŝ(t) for Taking minimum Ŝ(t)


uncensored observations
t Ŝ(t) t Ŝ(t)
6 1 6 0.826087
6 0.91304348 8 0.73913
6 0.86956522 12 0.652174
6 0.82608696 20 0.586957
8 0.7826087 24 0.513587
8 0.73913043 30 0.38519
12 0.69565217
12 0.65217391
20 0.58695652
24 0.51358696
30 0.38519022
24 0.513587
M 0.5
30 0.38519

M 24.63492 ≈24

RESULT:
Survivorship function, Ŝ(t) is calculated above and its plotted graph is as shown below.
Median value is 25.

SURVIVAL CURVE
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
6 8 12 20 24 30
PRACTICAL 10
QUESTION:
Following table shows the mid-year population, deaths by age and causes of a country in 1990.
(xᵢ , xᵢ +nᵢ ) Population Death
0-1 120905 1560
1-5 471119 250
5-10 522261 171
10-15 534756 148
15-20 589158 318
20-25 656338 508
25-30 510785 476
30-35 445412 517
35-40 462977 983
40-45 506480 1157
45-50 543670 1853
50-55 516124 2724
55-60 511489 4266
60-65 446800 6189
65-70 373773 8770
70-75 286391 11339
75-80 196498 131715
80-85 113212 12766
85+ 59753 12373
Cause of Death
CVD(R₁) Cancer(R₂) Infective Respiratory Accidents (R₅) All other causes(R₆)
Disease(R₃) disease(R₄)
7 12 14 54 26 1447
4 46 14 37 68 81
5 31 3 7 80 45
8 29 2 2 57 45
22 21 8 11 187 69
23 53 6 10 226 190
27 65 4 7 146 227
47 89 6 8 128 239
95 143 13 16 149 267
228 313 22 27 143 424
482 559 25 57 197 533
912 828 32 78 229 645
1742 1305 59 119 220 821
2905 1809 54 201 235 985
4625 2236 72 376 210 1251
6501 2463 75 646 198 1456
8225 2376 74 1019 272 1749
8042 1669 73 1197 278 1507
8086 1036 40 1375 351 1477
Compute Crude probability, Net probability (Type A and Type B) and partial probability of death eliminating the
effect of risk 6 of death.

THEORY:
Crude probability of death due to risk δ, Qᵢδ = dᵢδ/lᵢ

Net probability of death (type A) = qᵢδ = 1 - pᵢ^(Qᵢδ/qᵢ)

Net probability of death (type B) = qᵢ.δ = 1 - pᵢ^(1 - Qᵢδ/qᵢ)

Partially crude probability of death due to risk δ = dᵢδ/(dᵢ - dᵢε).(1 - pᵢ^((1 - Qᵢδ)/qᵢ) = dᵢδ/(dᵢ - dᵢε).(qᵢ.δ)
where qᵢ = dᵢ/lᵢ
pᵢ = 1 - qᵢ

CALCULATIONS:
Cause of Death
CVD(R₁) Cancer(R₂) Infective Respiratory All other causes(R₆)
Disease(R₃) disease(R₄) Accidents (R₅)
7 12 14 54 26 1447
4 46 14 37 68 81
5 31 3 7 80 45
8 29 2 2 57 45
22 21 8 11 187 69
23 53 6 10 226 190
27 65 4 7 146 227
47 89 6 8 128 239
95 143 13 16 149 267
228 313 22 27 143 424
482 559 25 57 197 533
912 828 32 78 229 645
1742 1305 59 119 220 821
2905 1809 54 201 235 985
4625 2236 72 376 210 1251
6501 2463 75 646 198 1456
8225 2376 74 1019 272 1749
8042 1669 73 1197 278 1507
8086 1036 40 1375 351 1477
Probablity of Probablity of Crude prob of
death survival (pᵢ) death due to
(qᵢ = dᵢ/lᵢ) risk (Qᵢ₆)
0.012902692 0.987097308 0.011968074
0.000530651 0.999469349 0.000171931
0.000327422 0.999672578 8.61638E-05
0.000276762 0.999723238 8.41505E-05
0.000539753 0.999460247 0.000117116
0.000773991 0.999226009 0.000289485
0.000931899 0.999068101 0.000444414
0.001160723 0.998839277 0.000536582
0.002123216 0.997876784 0.000576703
0.002284394 0.997715606 0.000837151
0.003408318 0.996591682 0.000980374
0.005277801 0.994722199 0.0012497
0.008340355 0.991659645 0.001605118
0.013851835 0.986148165 0.002204566
0.023463439 0.976536561 0.003346951
0.039592725 0.960407275 0.005083959
0.670312166 0.329687834 0.008900854
0.112761898 0.887238102 0.01331131
0.207069101 0.792930899 0.024718424

Crude prob of Net prob of Partially crude


death due to Net prob of death Type B probability of
For Risk 1: risk (Qᵢ₁) death Type A (qᵢ₁) (qᵢ.₁) death due to risk
5.78967E-05 5.82718E-05 0.012845169 5.82461E-05
8.49042E-06 8.49264E-06 0.000522163 8.49115E-06
9.57376E-06 9.57528E-06 0.00031785 9.57417E-06
1.49601E-05 1.49621E-05 0.000261804 1.49607E-05
3.73414E-05 3.73508E-05 0.000502421 3.73436E-05
3.50429E-05 3.50559E-05 0.000738961 3.5048E-05
5.28598E-05 5.28831E-05 0.000879062 5.28716E-05
0.00010552 0.000105576 0.001055259 0.000105549
0.000205194 0.000205391 0.001918219 0.000205253
0.000450166 0.000450579 0.001834642 0.000450354
0.000886567 0.000887687 0.00252287 0.000887002
0.001767017 0.001770128 0.003513893 0.001768124
0.003405743 0.003414183 0.004943049 0.003408485
0.006501791 0.006525855 0.007374102 0.006508996
0.01237382 0.012443233 0.011159061 0.012394715
0.022699736 0.022895168 0.017088808 0.022758316
0.041857932 0.066943959 0.646658058 0.042111533
0.071034873 0.072598751 0.043307196 0.071528801
0.135323749 0.140693089 0.077243661 0.137141782

For Risk 2:

Partially crude
Crude prob of Net prob of probability of
death due to Net prob of death Type B death due to risk
risk (Qᵢ₂) death Type A (qᵢ₂) (qᵢ.₂) (Qᵢ₂.₆)
9.92515E-05 9.98924E-05 0.012804079 9.98504E-05
9.76399E-05 9.7661E-05 0.000433033 9.76483E-05
5.93573E-05 5.93653E-05 0.000268073 5.93599E-05
5.42303E-05 5.42364E-05 0.000222537 5.42326E-05
3.56441E-05 3.56531E-05 0.000504118 3.56462E-05
8.07511E-05 8.07791E-05 0.000693268 8.07628E-05
0.000127255 0.000127306 0.000804695 0.000127283
0.000199815 0.000199911 0.000961004 0.000199869
0.000308871 0.000309151 0.001814625 0.00030896
0.000617991 0.000618506 0.001666919 0.00061825
0.001028197 0.001029423 0.002381346 0.001028702
0.001604266 0.001607221 0.003676489 0.00160527
0.002551375 0.002558794 0.005796393 0.002553429
0.004048791 0.004068795 0.009823008 0.004053278
0.005982241 0.006035254 0.017534007 0.005992342
0.008600131 0.008736625 0.031128053 0.008622325
0.012091726 0.019817185 0.663646588 0.012164985
0.014742253 0.015520034 0.098774853 0.014844761
0.017338042 0.01923964 0.191514124 0.017570973
For Risk 3:

Partially crude
Crude prob of Net prob of probability of
death due to Net prob of death Type B death due to risk
risk (Qᵢ₃) death Type A (qᵢ₃) (qᵢ.₃) (Qᵢ₃.₆)
0.000115793 0.00011654 0.012787642 0.000116492
2.97165E-05 2.97239E-05 0.000500942 2.9719E-05
5.74425E-06 5.74518E-06 0.000321679 5.7445E-06
3.74002E-06 3.74053E-06 0.000273022 3.74018E-06
1.35787E-05 1.35823E-05 0.000526178 1.35795E-05
9.14163E-06 9.14513E-06 0.000764853 9.14295E-06
7.83108E-06 7.8347E-06 0.000924071 7.83282E-06
1.34707E-05 1.34784E-05 0.00114726 1.34743E-05
2.80791E-05 2.81086E-05 0.002095166 2.80873E-05
4.34371E-05 4.34858E-05 0.002241006 4.34553E-05
4.59838E-05 4.60613E-05 0.003362411 4.60064E-05
6.20006E-05 6.21629E-05 0.005215963 6.20394E-05
0.000115349 0.000115827 0.008225482 0.000115442
0.000120859 0.000121697 0.013731809 0.000120993
0.00019263 0.000194907 0.023273068 0.000192956
0.00026188 0.000267169 0.039336065 0.000262556
0.000376594 0.000623205 0.670106575 0.000378876
0.000644808 0.000683916 0.112154686 0.000649292
0.000669422 0.000749801 0.206474115 0.000678416
For Risk 4:

Partially crude
Crude prob of Net prob of probability of
death due to Net prob of death Type B death due to risk
risk (Qᵢ₄) death Type A (qᵢ₄) (qᵢ.₄) (Qᵢ₄.₆)
0.000446632 0.000449437 0.012458855 0.000449327
7.85364E-05 7.85542E-05 0.000452133 7.85432E-05
1.34033E-05 1.34054E-05 0.000314021 1.34038E-05
3.74002E-06 3.74053E-06 0.000273022 3.74018E-06
1.86707E-05 1.86756E-05 0.000521087 1.86718E-05
1.52361E-05 1.52418E-05 0.000758761 1.52383E-05
1.37044E-05 1.37107E-05 0.000918201 1.37074E-05
1.79609E-05 1.79712E-05 0.001142772 1.79657E-05
3.4559E-05 3.45951E-05 0.002088693 3.45689E-05
5.33091E-05 5.33687E-05 0.002231145 5.33315E-05
0.000104843 0.000105017 0.003303648 0.000104894
0.000151126 0.000151515 0.005127063 0.000151221
0.000232654 0.000233602 0.008108647 0.000232841
0.000449866 0.000452908 0.013404999 0.000450364
0.001005958 0.00101743 0.02246887 0.001007657
0.002255657 0.00229888 0.037379777 0.002261479
0.005185803 0.008547639 0.667469818 0.005217222
0.010573084 0.011155496 0.102752659 0.010646602
0.023011397 0.025454508 0.186358251 0.023320548
For Risk 5:

Partially crude
Crude prob of Net prob of probability of
death due to Net prob of death Type B death due to risk
risk (Qᵢ₅) death Type A (qᵢ₅) (qᵢ.₅) (Qᵢ₅.₆)
0.000215045 0.000216421 0.012689018 0.000216342
0.000144337 0.000144365 0.000386342 0.00014435
0.00015318 0.000153193 0.000174256 0.000153187
0.000106591 0.0001066 0.00017018 0.000106595
0.000317402 0.000317437 0.000222387 0.000317421
0.000344335 0.000344409 0.000429731 0.000344385
0.000285835 0.000285927 0.000646157 0.000285898
0.000287374 0.0002875 0.000873474 0.000287452
0.00032183 0.00032212 0.001801675 0.000321923
0.000282341 0.000282624 0.002002336 0.000282459
0.000362352 0.000362905 0.003046518 0.00036253
0.000443692 0.000444768 0.004835184 0.00044397
0.000430117 0.000431827 0.007911945 0.000430463
0.000525962 0.000529499 0.013329394 0.000526545
0.000561838 0.000568373 0.022908086 0.000562787
0.000691363 0.000705173 0.038914994 0.000693147
0.001384238 0.002288791 0.669555848 0.001392625
0.00245557 0.002602002 0.11044728 0.002472644
0.005874182 0.006560358 0.201832839 0.0059531

RESULT: So, all the required probabilities are calculated above in the given table.

You might also like