ACST 3058 - Survival Models Assignment - Macquarie University

Download Solution Order New Solution

Assignment Task

Question 1

For this question, DO NOT use the survival library in R.

The following table recorded the numbers of days for 20 patients to have stayed at Hospital A for treatment of accidental injuries:

Patient No.

1-4

5

6

7

8

9

10

11

12

13

14

15

16

17

18-20

Start day

0

1

0

1

0

2

0

1

3

0

1

2

0

0

0

Days of stay

1

1

2

2

3

3

4

4

4

5

6

6

8

8

10

End of stay

Y

Y

Y

N

Y

Y

N

N

Y

Y

Y

Y

Y

N

N

 

where

  • “Start day” is the number of days at other hospitals before being transferred to Hospital A;
  • “Days of stay” is the number of days stayed at Hospital A;
  • “End of stay” indicates if a patient has ended hospitalisation (Y) or not (N).

Let T denote the total time (in days) that a patient stays in all hospitals to treat the injury.

  • Calculate the Kaplan-Meier estimate (KME) of the survival function and the Nelson-Aalen estimate (NAE) of the cumulative hazard function of T . Plot the KME of S(t) as step curves. Note: do not consider any estimates beyond t k in your plot.
  • Find an approximate 95% log-transformed confidence interval for the probability that a patient is released within 5 days of hospitalisation based on the NAE in part (a).
  • Estimate E[ T ] using the KME in part (a) with exponential

Question 2

Let { t i , δ i , i = 1, 2,…, n } be a random sample of survival data, where t i are survival times and δ i are censoring indicators with δ i = 1 if t is uncensored, or δ i = 0 if censored. The data are modelled by the distribution with the following survival function:

, where α > 0 and β > 0 are two positive parameters.

  • Write an function in R to calculate the relevant log-likelihood value, which can be used to calculate the maximum likelihood estimate (MLE) of ( α , β ) .
  • A set of data { t i , δ i , i = 1, 2,…, n } is given below:

ti

0.2

4.3

2.5

3.3

1.4

0.8

3.8

0.4

δi

1

1

1

0

1

1

0

1

 

Assume (known) α = 1 . Use maxLik library in R and a modified function of what you wrote in part

  • to find MLE of β . Then, with relevant output(s) of maxLik, find an approximate 95% linear confidence interval of β , assuming that MLE is normally distributed. Note: you may need to use a start value of 0.5 in the optimization.
  • Based on the data and assumption in part (b), find an approximate 95% confidence interval of β that is guaranteed to be within the domain of β > 0 .

Question 3

For this question, DO NOT use the survival library in R.

The following table shows the lifetimes of 14 lives after age 60:

Life i

1

2

3

4

5

6

7

8

9

10

11

12

13

14

ti

6

6

8

8

8+

10

10+

15+

20

20

25

25+

30

30+

z(i)

0

1

0

1

0

1

0

1

1

0

1

0

1

1

 

where t represents the lifetime of life i (in years after age 60), with + indicating survival; and z is a covariate to indicate if a life is male ( z = 0) or female ( z = 1) .

A Cox proportional hazards model is adopted to analyse the above data. Let β denote the coefficient of covariate z and b = e β .

  • Write an function in R to calculate the relevant partial log-likelihood value, which can be used to calculate the maximum likelihood estimate (MLE) of b .
  • Use maxLik library in R and the function you wrote in part (a) to find MLE of b and the corresponding standard error. Note: use a start value of 1 in your optimization.
  • Perform a two-tailed test at 5% level the null hypothesis H 0 : b = 1 (i.e., there is no difference between male and female lifetimes) by a Wald-test (based on the assumption that ML estimator of b follows a normal distribution), using your results in part (b).

Question 4

The times to the first accident by 15 drivers after getting their drivers’ licences are recorded below:

i

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

ti

4*

4

6

8*

12

12*

15

15

18

18*

22

24

28

36

36*

z1(i)

0

0

1

0

1

1

1

0

0

0

1

0

1

1

0

z2 (i)

0

0

0

1

0

1

0

0

1

1

1

0

1

1

1

 

where

  • is the time (in months) to the first accident by driver i , with * indicating a censored time (no accident occurred by time t ),
  • is the gender indicator ( z = 0 for male; z = 1 for female), and
  • z 2 is the age indicator ( z 2 =0 for age below 25; z 2 = 1 for age 25 or above) .

A Cox proportional hazards model is applied to analyse the above data by the method of partial likelihood. Let b 1 and b 2 denote the coefficients of covariates z and z respectively, a = e 1 and b = e 

  • Use R-code coxph available in library(survival) to obtain the maximum (partial) likelihood estimates (MLE) of he covariate coefficients (b , b ) and then obtain the MLE of ( a , b ) = ( e 1 , e 2 ).
  • Estimate the probability for a female driver below age 25 to have no accident in one year after 6 accident-free months from getting her driver’s licence, using the Breslow’s estimate of the baseline cumulative hazard Note: DO NOT use any function in the survival library for this part.
  • Perform a relevant likelihood-ratio test at 1% level to determine if age has a significant

This ACST 3058 - Mathematics has been solved by our PhD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.