Search the whole station

生存分析代写 ST227代写 R语言代写 Survival Analysis代写

ST227 Survival Analysis


生存分析代写 Instructions to candidates This paper contains four questions. Answer ALL FOUR. Question 1: 25 marks Question 2: 30 marks Question 3: 25 marks

Instructions to candidates

This paper contains four questions. Answer ALL FOUR.

Question 1: 25 marks

Question 2: 30 marks

Question 3: 25 marks

Question 4: 20 marks

The marks in brackets reflect marks for each part of a question.

Time allowed Reading Time:


Writing Time:

2 hours


(b) Define in R the density function for T20. This definition may involve a numerical integral. [ 5 marks]

(c) Calculate the expected remaining lifetime for a 20-year-old individual. [ 5 marks]

(d) Define in R the cumulative distribution function of T20. This definition may involve a numerical integral. [ 5 marks]

(e) Discuss how one can numerically find the median of this distribution. Outline the approach only, you are not required to solve for the median. [ 5 marks]

[Total 25 marks]

2. 生存分析代写

This questions is divided into two parts. Both parts use the same data set of fully observed lifetimes given below:

80 75 38 45 62 65 77 92 65 60

55 67 72 46 64 35 68 52 45 94

i. Derive algebraically the probability density function for lifetime and write down the joint-likelihood of the given sample. [5 marks]

ii. Using optim and the initial values λ0 = 67 and γ0 = 0.2233, numerically obtain the maximum likelihood estimators of the model parameters. [8 marks]

iii. For the purpose of lifetime modelling, what range of values for γ would yield a sensible model? [2 marks]

[Total 30 marks]

3. 生存分析代写

Cancer patients who are in remission are observed and the number of days until the symptoms reappear is recorded. Some records have been right-censored. The data set is provided in a spreadsheet named cancer.xlsx and the columns therein are:

• time: the time until reappearance of symptoms in number of days.

• event: an indicator variable taking value 0 if the record has been right-censored and 1 if fully observed.

• fullyObserved: logical variable indicating whether the record has been fully observed.

• sex: categorical variable with value 0 for male (the reference group) and 1 for female.

(a) Calculate the Kaplan-Meier estimate for survival probabilities. [15 marks]



In this question, we will fit a Cox Proportional Hazard model on the same data set in Question 3, with time as the response variable and sex as the categorical covariate.

(a) By using the survival package, calculate the MLE for the Cox Proportional Hazard Model. [10 marks]

(b) Based on the output you have generated, perform the z-test, Score test, and Likelihood Ratio test on the following hypotheses:

H0 : β = 0, vs H1 : β  0.

[7 marks]

(c) It is hypothesised that cases with remission time greater than 125 belong to a different class of cancer. Create a data frame containing this subset of cases. [3 marks]

[Total 20 marks]

更多代写:IT assignment代写  gmat代考价格  英国politics政治学代写  Marketing essay代写  北美math论文代写  programming程序代写

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

The prev: The next:

Related recommendations