Advertisement

What are the survival and density functions?

阅读量:

Homework2

Each exercise part(e.g. 2a) will be marked out of 3, with the following criteria

3 marks for an almost perfect answer.

A score of 2 is awarded if there are minor issues that are sufficiently significant to warrant examining the solutions.

1 require marking if there are serious issues, which necessitate a review of the lecture notes

O marks for an overall poor attempt

The maximum achievable score from the exercises is 24, with an extra point awarded if your submission is well-organized, properly uploaded through GradeScope, and ensures that each response corresponds accurately to its respective question (this simplifies marker workload significantly)

In any exercises which involve the use of R, you are requested to submit both your code and the corresponding output.

Exercise 1 Suppose the random survival time T has hazard function h(t) = 2/(t+8)

a . What are the survival and density functions?

H(t) = \int \frac{2}{t+8}\text{d}t= \text{ln} \frac{2}{t+8}

h(t) = \frac{f(t)}{S(t)}

S(t) = e ^{- \text{ln} \frac{2}{t+8} } = -\frac{2}{t+8}

f(t) = \frac{2}{t+8} \times e ^{- \text{ln} \frac{2}{t+8} }

b. Find the mean and median survival times

半数生存时间亦被称作中位生存时间(median survival time),它表示当一半个体未发生失败事件时所对应的时间点,并且对应于该个体群在存活曲线纵轴上50%位置的时间值;而平均生存时间则代表了该存活曲线下的面积值(area under the curve)

the mean times is \text{ln} \frac{1}{t+8}

the median survival times is - H(S(t))= - \text{ln} \frac{2}{t+8}

Exercise 2

For sequential survival data, the following (in months) were recorded for a group of ten patients diagnosed with colorectal cancer after undergoing resection of isolated pulmonary metastases.

2 10 14 27 27 37 44 46 54 60

Compute the empirical survival function manually and construct a plot of it, then calculate the median survival time.

The corresponding probability of survival is 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0

the median survival time is

( 2 * 0.9 + 10 * 0.8 + 14 * 0.7+ 27 * 0.6 + 27 * 0.5 + 37 * 0.4 + 44 * 0.3 + 46 * 0.2 + 54 * 0.1 + 60 * 0 ) / 10 = 9.19

复制代码
    knitr::include_graphics("pic.png")
    
    
      
    
    AI助手

b . Assume that the observed duration of 44 months does not signify an event but a censoring point. What modification should be applied to your analysis? Execute the appropriate methodology and illustrate your estimated survival curve without utilizing R (demonstrate your approach)

复制代码
    library(survival)
    
    df = data.frame("month" = c(2 ,10,  14 ,  27  , 27  , 37 , 44, 46,  54, 60))
    df$surv =9:0/10
    fit <- survfit(Surv(month) ~ surv, data = df)
    print(fit)
                
    
    
      
      
      
      
      
      
      
    
    AI助手
复制代码
    plot(df$month,df$surv, type = "l")
    
    
      
    
    AI助手

It can be observed from the m-k curve that as survival time increases, survival rate decreases. The steep slope of this section signifies that descent velocity is rapid and typically leads to short survival times.

C . Repeat your analysis in part b using R ( show your code and output)

The survival time and mortality of those with colorectal cancer undergoing surgery for isolated lung metastasis exhibit a linear trend.

复制代码
    library(survminer)
    surv_summary(fit)
    
    
      
      
    
    AI助手

.

d. Construct an approximate 5% confidence interval for the survival probability S(11) without resorting to R.

Within the interval spanning from 10 to 14, its value should be considered as a forecast.

(0.8 - 0.7 ) / 4 = 0.25

S(11) = S(10) - 0.25 = 0.775

The standard error is SD (0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.0) = 0.302765

The upper limit of the confidence interval of 95 is 0.775 + 1.96 * 0.302765 / sqrt (10-1) = 0.9728065

The lower limit of the confidence interval of 95 is 0.775 - 1.96 * 0.302765 / sqrt (10-1) = 0.5771935

The confidence interval of 95 is [0.5771935, 0.9728065]

Exercise 3

Hospitals adopt high-quality, specialized mattresses designed to prevent recurrent episodes of pressure sores.

An assessment of a new type of mattress was conducted with 20 bed patients. The participants were provided with the new mattress and monitored afterward over a 12-day period, until the emergence of the first ulcer.

Between their sixth-day inspection and seventh-day inspection, five patents were eliminated from the study because of complaints regarding discomfort from the mattresses. Interestingly, none of these five patients had developed ulcers prior to their elimination. During the study, ten patients developed ulcers.

The days when these ulcers were first discovered were

1 2 2 2 5 5 8 8 8 8

Take, for instance, the first patient in this group. They were identified with a pressure ulcer during their initial check-up on day 1. Consequently, this ulcer must have developed within the period spanning from when they were admitted (day 0) up until just before their subsequent check-up on day I.

Five participants successfully completed a 12-day study without experiencing any ulcers. Following their day 12 evaluation, they were gradually released from the hospital, with none showing signs of ulcers prior to discharge.

Let’s denote T as representing, for a randomly selected individual, their time duration of days from initiating mattress use until experiencing their initial pressure ulcer. Our goal is to calculate this unknown survival function S(t) associated with T across a 19-day study period, starting from when subjects entered and continuing until all participants have been discharged.

Classify the types of censoring encountered in this study. Should estimation of the unknown survival function S be conducted using the empirical survival function, Kaplan-meier estimator, or actuarial estimator?

The temporal sequence of events in which individuals leave midway demonstrates a strong correspondence with the lifetab function. Given this correspondence, I propose utilizing the actuarial estimator through the KMsurv package.

复制代码
    library(survival)
    library(KMsurv)
    tis <-  c(1,2,5,  7, 8,12,NA)
    nsubs <- c(20, 19, 16, 14, 9, 5)
    nlost <- c(0,0,0,0,0,0)
    nevent <- c(1,3,2, 5, 4,0)
    
    surv = lifetab(tis, nsubs[1], nlost,nevent) 
    surv
    
    
      
      
      
      
      
      
      
      
      
    
    AI助手
复制代码
    data = data.frame(time = c(1,2,5,7, 8,12), surv = surv$surv)
    plot(data$time,data$surv, xlab="Time", ylab="Survival Probability",type = "l")
    
    
    
      
      
      
    
    AI助手

b) Employ the selected technique to approximate the survival function without resorting to R software. For any notation utilized in your computations, please elucidate its significance within this study's framework.

At an un-censored event occurrence, the survival estimation is calculated as a product of probabilities. The conditional probability principle introduced in foundational statistics courses outlines.

\begin{array}{rcl} S(t)&=&\text{生存概率在时间点}~t\\ &=&\text{在条件}~T\geqslant t~下事件~\{T>t\}发生的概率乘以事件~\{T\geqslant t\}的概率\\ &=&[1-\text{在条件}~T\geqslant t~下事件~\{T\leqslant t\}发生的概率]\cdot P(T\geqslant t)\\ &=&[1-\text{在条件}~T\geqslant t~下事件~\{T=t\}发生的概率]\cdot P(T\geqslant t)\end{array}

Therefore, the KM estimate of the survival probability:

The next day survival probability is 1- 1/20 = 0.95

The fifth day survival probability is 1- 4/20 = 0.8

The seventh day survival probability is 1- 6/20 = 0.7

The eighth day survival probability is 1- 11/20 = 0.45

The 15th day survival probability is 1- 15/20 = 0.25

The survival probability in the past 15 days was 0.25.

全部评论 (0)

还没有任何评论哟~