Question: a ) Write a function of the form function ci = hrci ( B , alpha ) that takes the number of bootstrap replicates and
a Write a function of the form
function ci hrciB alpha
that takes the number of bootstrap replicates and the confidence level as input argu
ments and returns an confidence interval for HRRun your function with
to get reliable estimates. For example, hrci should return a confidence
interval based on bootstrap replicates.
Hint: sorthr returns a sorted list of hazard ratios. For example, if and
then the required confidence interval can be found with
hr sorthr; overwrite with sorted array
ci hr hr;
Your code should work with any positive value of and any value of between and
You do not need to check that in your code. The expression roundB
alpha returns the nearest integer index in the sorted array corresponding to the
lower point of the confidence interval. You will need to determine an analo
gous expression for the upper index. Include a copy of your code in your writeup.
b Run your code five times with and and list the results that you
get
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
