馃攳
Calculate Hazard Ratios [Survival Analysis] - YouTube
Channel: unknown
[0]
Hey guys, in this video
[1]
I'm going to do these two survival analysis problems and they're both on calculating a hazard ratio.
[8]
So basically for each problem we have two groups, group 1 and group 0, and we have the survival times
[15]
for these two groups and each survival time follows a certain probability distribution.
[21]
And we basically want to calculate,
[23]
given the probability distribution or whatever information, a ratio of the hazard functions for each of the two groups.
[30]
I'm gonna go ahead and do this problem first. For the first problem for group 1,
[36]
we're given that the survival times follow an exponential distribution where the parameter lambda is equal to 1 and for
[43]
group 0 we're given that the survival times follow an exponential
[48]
distribution with lambda equal to 2. The hazard functions for an exponential distribution
[54]
have a nice property to them but let's first assume that we don't know what the formula is for
[60]
calculating a hazard function from an exponential distribution. So we're just going to use the formula instead.
[66]
So a hazard function is equal to the PDF of a probability distribution divided by the
[72]
survival function. And the survival function in turn is equal to 1 minus the CDF of the probability distribution.
[80]
For group 1, we can calculate the hazard ratio as follows.
[86]
I'm just going to plug in the PDF of an exponential distribution,
[90]
which is lambda e to the negative lambda x over 1 minus the CDF of the exponential distribution,
[98]
which in turn is 1 minus e to the negative lambda x. This will simplify to
[104]
lambda times e to the negative x times lambda over
[108]
1 minus 1 plus e to the negative
[112]
lambda x.
[113]
One minus 1 is just 0 and then in the numerator and the denominator,
[117]
we can cancel out the e to the negative lambda x. This gives us just lambda.
[123]
So for any exponential distribution,
[125]
the hazard ratio is always just going to be equal to the parameter value of lambda.
[131]
So for the hazard ratio in group 1, lambda is equal to one.
[135]
The hazard ratio for group 1 is going to be equal to 1.
[139]
And for group 0,
[141]
the exponential distribution has lambda parameter equal to 2,
[144]
so the hazard ratio for group 0 is going to be equal to 2. And then the hazard ratio is just the ratio of
[152]
the hazard function for group 1 over the hazard function for group 2.
[156]
So for the first problem, that's just going to be a proportional hazards ratio of 1 over 2, and we're done with this first problem.
[165]
Then for this second problem,
[167]
we're basically going to do something similar. For group 1, we have that the survival times follow an exponential distribution
[175]
with lambda equal to 1 but for group 0 we're not given an exponential distribution
[180]
and we're also not given the actual probability distribution. We're given the survival function.
[186]
We have that the survival function for group 0 is equal to e to the negative x squared.
[192]
For group 1, we know the hazard function
[196]
for group 1 is just going to be equal to 1 because that's the same as how we did it for the last problem.
[202]
And now for group 0, we have to calculate from the survival function the hazard function.
[208]
One formula for doing that is that the hazard function is going to be equal to negative
[216]
the derivative of the log of the survival function.
[221]
Negative d log of the survival function dx will give you the hazard ratio for group 0.
[228]
So I'm going to do this step by step. I'm first going to take the natural log of the survival function.
[235]
When I do that, I'm just going to get negative x squared. Then
[239]
I'm going to take the derivative of the natural log of the survival function and that's going to give me negative 2x.
[246]
And then the final thing I have to do is take a negative on both sides.
[251]
The negative of the derivative is just going to give me 2x.
[255]
So in this case, the hazard ratio h1 over h0 is going to be equal to 1 over 2x and
[263]
also, this survival function or survival curve is a special case of the Weibull or Weibull distribution
[272]
which has two parameters
[274]
lambda and alpha.
[275]
Just as a general formula, the hazard ratio from a Weibull distribution
[281]
is alpha times lambda times x to the alpha minus 1.
[286]
So in this case, this is a solution for when the Weibull distribution
[291]
has lambda equal to 1 and alpha equal to 2. And we're done with this problem!
[299]
*chiptune music*
Most Recent Videos:
You can go back to the homepage right here: Homepage





