Question
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
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 ti 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 . (a) Write a function in R to calculate the relevant partial log-likelihood value, which can be used to calculate the maximum likelihood estimate (MLE) of b. (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. (c) Perform a two-tailed test at 5% level the
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started