Search the whole station

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

334

## Project

### 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.

None

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]

### 4.

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]

The prev: The next:

### Related recommendations

• #### r语言代写-r语言考试和作业难度大吗？不会可以找r语言代写

475

r语言考试和作业难度大吗？不会可以找r语言代写公司帮做吗？ r语言代写 在国外留学生可以获得更好的教学条件和资源，并且掌握世界一线知识和技巧，特别是互联网行业。现在很多国外大学都纷纷开设相关专业供留...

View details
• #### 统计计算方法代写 R语言代写 统计作业代写 Bayesian代写

617

HW 10 统计计算方法代写 Question (7 pts) Recall the Beta distribution, which is defined for θ ∈ (0, 1) with parameters α and β, has a density proportional to: Question (7 pts) 统计计算方法代...

View details
• #### 计量经济作业代写 ECON7310代写 R语言代写 计量经济代写

401

ECON7310: Elements of Econometrics 计量经济作业代写 Instruction Answer all questions following a similar format of the answers to your tutorial questions. When you use R to conduct empirical ...

View details
• #### 金融大数据分析代写 FIN 510代写 R语言代写 大数据分析代写

99

FIN 510 Big Data Analytics in Finance Lab 4: Data Exploration 金融大数据分析代写 Summarizing Data on Firm Fundamentals The file firm.csv containsfirm fundamental variables, including total ...

View details
1