A practical and example filled tour of simple and multiple regression techniques (linear, logistic, and Cox PH) for estimation, adjustment and prediction.

Loading...

From the course by Johns Hopkins University

Statistical Reasoning for Public Health 2: Regression Methods

75 ratings

A practical and example filled tour of simple and multiple regression techniques (linear, logistic, and Cox PH) for estimation, adjustment and prediction.

From the lesson

Module 1B: More Simple Regression Methods

In this model, more detail is given regarding Cox regression, and it's similarities and differences from the other two regression models from module 1A. The basic structure of the model is detailed, as well as its assumptions, and multiple examples are presented.

- John McGready, PhD, MSAssociate Scientist, Biostatistics

Bloomberg School of Public Health

Hi, and welcome back.

Â In this section, we'll talk briefly about accounting for

Â the uncertainty in our slope estimates from Cox regression.

Â I don't think we'll see anything that will surprise you here.

Â And then, we'll also talk briefly about translating Cox regression results to

Â predict its survival curve.

Â So upon completion of this lecture section hopefully you'll be able to

Â create 95% confidence intervals for the slopes from simple Cox regression and

Â convert these to 95% confidence intervals for

Â the hazard or incidence rate ratio for the predictor in the model.

Â You'll be able to estimate P values for testing the null hypothesis that the slope

Â or log hazard ratio is zero and hence the exponentiated slope or hazard

Â ratio is one indicating no association between our predictor and the outcome.

Â And then, you'll also, hopefully,

Â appreciate that the results from Cox regression models can be translated into

Â estimated survival curves for each of the groups defined by our predictor.

Â So a randomized clinical trial, we're very familiar with this example.

Â On 312 patients with primary biliary cirrhosis we've looked at this before,

Â this is data from the Mayo Clinic.

Â And in the last section we took bilirubin as a continuous measure and used Cox

Â regression to estimate the association between mortality and the bilirubin

Â level at enrollment in the study measured in milligrams per deciliter.

Â And we found the following result.

Â The log hazard of mortality at a given time was equal to

Â the log risk of mortality at baseline.

Â Log hazard of mortality in our referent group plus

Â 0.15 times the bilirubin level in milligrams per

Â deciliter of the group we're estimating it for.

Â And so we saw this slope.

Â Beta-1 of 0.15 was the estimated difference in

Â the log hazard of mortality at any given time in the followup period for

Â two groups who differed by 0.1 mg/dL in bilirubin levels.

Â And if we exponentiated this to get the estimated hazard ratio, it turned out to

Â be about 1.16 so if we compare two groups whose bilirubin and

Â differed by 1 milligram per deciliter, the group with the higher level had 16 percent

Â higher estimated mortality over the followup period

Â compared to the group with 1 milligram per decimate a lower level of bilirubin.

Â So how do we get these estimates?

Â Well, of course, we go to the computer and there must be

Â some algorithm that always yields the same results for the same data set, and

Â the algorithms is really similar to what we saw with logistic group regression.

Â For Cox regression, it's actually called Partial Maximum Likelihood.

Â because there's a part of the model that uses a different method of estimation,

Â the part that estimates that Lambda not of P,

Â the law of hazard is a function of time.

Â And then the part that estimates the slope uses the maximum likelihood approach.

Â So, this part that estimates the slope under the assumption of

Â proportional hazards that takes the value of beta 1,

Â makes our observed data and outcomes most likely among all choices.

Â So this is similar to the approach used for logistic progression.

Â And this approach also estimates the standard error for

Â the slope estimate, and this has to be done by computer.

Â There's no easy closed form equation that we can solve by hand, nor

Â would we want to with a large data set.

Â So here are the results from the Cox Regression with mortality and bilirubin.

Â We estimated that the log hazard of mortality at any given time T was

Â estimated for at some log baseline risk at that time

Â plus the slope of 1.5 times the bilirubin level of the group we were looking at

Â is the slope with x1 measures bilirubin in milligrams per deciliter.

Â If I actually use the computer, I get an estimated slope.

Â As we solve 0.15, the estimated standard arrow for this slope is 0.013.

Â So, we can easily, using the same old approach, take in our estimate plus or

Â minus two estimated standard errors.

Â We can estimate a 95% confidence interval for the true population level slope or

Â the true population level log hazard ratio of mortality for

Â two groups who differ by one milligram per deciliter in bilirubin.

Â And the population here is people with primary biliary cirrhosis.

Â So, this is our 95 percent conferencible slope population level.

Â If we exponentiate the end points we get a 98 percent conferencible.

Â But for a hazard ratio of mortality associated with bilirubin.

Â So putting all our results together, our estimated hazard ratio was 1.16 and

Â the confidence interval, 1.13 to 1.19.

Â So we estimate a 16% increase in mortality for one unit difference in bilirubin.

Â But after counting for the sample variability,

Â the true association could be an increase between 13 and 19 percent.

Â Notice that this confidence interval does not include the null value for

Â ratios of one and the previous confidence interval for

Â the log ratio did not include the null value of zero.

Â How could we get a p value for this?

Â Well, what is our no hypothesis here?

Â It would be the no at this slope or

Â this true population level log hazard ratio of 0.

Â Another way to state this is that the exponentiated slope.

Â Which is the population lesser hazard ratio is one.

Â There in fact is no association between mortality and bilirubin.

Â So what we do is we start by assuming the null, assume the null, and then we measure

Â how far our result is in a distance measure of how far our result is.

Â From the null in terms of standard error,

Â this is just like every other distance measure we computed.

Â I'm going to call it a z here because that's what you see in textbooks and

Â that just means we always use the normal table when getting a p value, but

Â if you do this out, we get a result that looks like this 11.5.

Â So we have a result and estimate that 11.5 standard errors above what weve expect

Â to have gotten just by chance, when a null is true.

Â So we'd expect on average our estimates would equal to null of 0,

Â but there's some variations around them but even after tally for

Â that variation we have something way far above, 11.5.

Â Above what we'd expect.

Â So, if we compute the p value, it's the probability of being as far,

Â or farther from 0, when the known hypothesis is true,

Â this p value is way less than 0.001.

Â In the normal table, in fact, doesn't go that high.

Â And it's data reports it at 0.0000, so that's some very small number.

Â Suppose we wanted to get a confidence estimate for

Â the estimated hazard ratio, for persons with bilirubin levels of

Â 3.5 milligrams per deciliter versus 0.8 milligrams per deciliter.

Â We already computed this difference on the log hazard ratio scale.

Â We took the difference in bilirubin levels between the two groups, which was 2.7.

Â And we multiplied it by the slope.

Â Difference in law of mortality per one unit difference in bilirubin.

Â And so the cumulative difference in mortality log, risk of mortality for

Â 2.7 usable bilirubin is 0.405.

Â Well, to get the confidence interval for this, all we're going to do is

Â take the confidence interval endpoints for the original slope and

Â multiply each of them by this multiple of 2.7.

Â So whenever we do the estimate to get our measure for a unit difference that

Â is not one on the x scale, we also do to the endpoints of the confidence interval.

Â And so if we do this, and we get the end points on the conference interval.

Â These go from 0.335 to 0.475.

Â If we exponentiate them,

Â we get a confidence interval that goes from 1.40 to 1.61.

Â So you may recall the exponentiated estimate was 1.5.

Â So we estimated that the group with bilirubin levels of 3.5 milligrams per

Â deciliter at study enrollment had a 50 percent greater risk of mortua,

Â mortality than the group with 0.8 milligrams per deciliter and

Â this 50 percent elevated risk was across the entire follow up period, but

Â after accounting for sampling variation.

Â This increased risk could be on the order of 40% to 61%.

Â So how could we actually take these results now and

Â translate them back to survival function?

Â In other words, for a given value of bilirubin, could we translate these

Â results that are estimated on the log hazard scale back to the proportion who

Â would survive beyond a given point in time with a specific spilurin level?

Â Well the short answer is, it can be done, but it's mathematically involved.

Â I'll give you a little window into that in a minute.

Â But further, when we have a continuous measure, like bilirubin.

Â It's not generally possible to display the estimated survival curves,

Â for all possible values of x1 in a sample.

Â You know, our range here was 0.3 to much larger.

Â Even if we could theoretically estimate the curve, for each.

Â Value.

Â So for display purposes if we were presenting this in the paper,

Â these results, we might choose to present the estimated survival curves from

Â Cox Regression for several specific values of bilirubin.

Â And here's and example of this graph.

Â And I had to use the computer to do this, but what I've plotted here.

Â Are the estimated survival curves for

Â subjects with bilirubin levels of 0 .5 at time of enrollment, one, two, and three.

Â And you can see

Â these curves all have similar shape after they diverge, and if we were to zoom in.

Â In the early stages of the followup term,

Â we see similar shapes as well but there is this ordered difference.

Â Its bilirubin at baseline increases the proportion surviving beyond

Â a certain point and the follow up time decreases.

Â How did we get these estimates or how does the computer does it, do it?

Â What's not so simple is just plugging in a value of bilirubin and

Â cranking out a number because we also have to consider the time element.

Â So the longer answer.

Â And I'm just giving you this for

Â some insights here is at any given time t for any value of x1.

Â In our case, bilirubin, we can plug in the bilirubin value.

Â And get the log hazard of mortality at that time by adding whatever this thing

Â is at time t,

Â whatever this starting log hazard is plus .15 times our bilirubin estimate.

Â And then we can exponentiate this to get the hazard of mortality.

Â For a group with that bilirubin level at that specific time.

Â So the instantaneous rate of mortality at that time for

Â persons with that bilirubin level.

Â And again, this is just FYI, but

Â we can get something called the Cumulative Survival for

Â any given group at a specific time in the follow-up period which estimates the total

Â amount of risk they've accrued from time zero up through this given time.

Â And what this is equal to and

Â if you haven't had calculus you may not recognize this symbol.

Â And if you have had calculus you may wish to forget this symbol, but

Â this is the integral from time zero to time t of the time specific hazards.

Â And what this really means for those of you who

Â are not intrigued by the wonders of calculus, and

Â certainly we don't require this for this course,

Â but this basically sums up the time specific risks or

Â hazards from the start of the study to the current time.

Â Wherever we're looking and then finally the survival function is equal

Â to the exponentiated with the base e of the negative of the cumulative hazard.

Â So let's just think logically about this for a minute.

Â This percentage, the percentage surviving beyond

Â a given time t is going to be smaller.

Â The larger this cumulative hazard is, so let's, even if you don't appreciate this

Â mathematics, you don't have to worry about the math, but just think of the gist of

Â this that says the more risk a group has incurred over time,

Â the smaller their chances of making it beyond a given time point.

Â And that's what the mathematics behind this does.

Â And I obviously won't expect you to do any of this by hand.

Â I can't do this by hand.

Â This requires a computer but I just wanted to give you some intuition as to

Â how we can translate the results from Cox regression back into a function that

Â tracks the proportion who have not had the outcome over time.

Â Because remember our regression involves the element of

Â time through that base line log hazard function.

Â Let's look at our example of gestational age and infant mortality.

Â Recall we had gestational age categorized into five categories so

Â our baseline group was those who were pre-term, less than 36 weeks.

Â The group that was 36 weeks to 38 weeks,

Â those who were 38 weeks to 39 weeks, those

Â who were 39 weeks to 41 weeks, and those who were greater than or equal to 41.

Â And so, we got the estimates,

Â we translated them into hazard ratio estimates before.

Â But here are the estimates with their accompanied standard error

Â from the computer.

Â And I'm not going to go through the computations here, but

Â you could easily compute the conference intervals for

Â each of these corresponding slopes and hazard ratios by hand.

Â Here's the end result though.

Â This gives the estimated re,

Â I'm sorry, reference group here is the pre-term group.

Â This gives the estimated hazard of mortality anywhere on the followup period

Â for children with each of these.

Â In each of these other four gestational age categories.

Â And the resulting confidence interval.

Â And you could verify that based on the information they gave you before.

Â But you can see all of these comparisons are statistically significant as evidenced

Â by the lack of one in the confidence interval and the low p values.

Â So there is a significant reduction in mortality relative to

Â the reference group for each of these four additional gestational age categories.

Â However, if you look you can see that the confidence intervals for

Â these things across some of the gestational age categories cross over.

Â So, again, this bolsters the general idea that the big difference in,

Â in risk of, for mortality is making it to full term versus not.

Â We could, if we wanted to, go through with the mathematics or

Â have the computer do it for us, and

Â it's actually easier to to in a computer package and estimate the survival curves

Â based on these Cox model results for each of the gestational age categories.

Â And here it is for all five.

Â One of them is directly on top of another, so

Â it only looks like there are four curves.

Â But you can see these results look very similar to what we

Â got with the Kaplan Meier curves.

Â And in fact you might ask, how are these different?

Â Well, let me show you the Kaplan Meier estimates versus

Â the Cox Regression estimates for two of the groups.

Â This is for the greater than 41 week group.

Â And this is for the reference group of less than 36 weeks.

Â And if you look at these zoomed in upon,

Â the Cox regression estimates are the curves that tend to be smoother.

Â And the Kaplan-Meier are the choppier curves.

Â And you can see they look similar and they track similar territory, but

Â they don't exactly agree.

Â And that's because the Cox regression is estimating the survival curve

Â having estimated the log hazard under the assumption of proportional hazards.

Â Whereas the Kaplan Meier just takes the data as is and

Â doesn't make any assumptions structurally.

Â So we will get different estimates.

Â The nicety of using the Cox regression results as we'll see in the,

Â when we get to multiple regression is that we can estimate specific survival

Â curves for multiple val x inputs, not just one at a time, so we can get more

Â specific in whom we estimate the survival for based on more than one predictor.

Â So in general, Cox regression slopes are interpretable, as we noted, as log hazard

Â ratios, and the 95% confidence levels for the slopes can be constructed, as usual,

Â by taking our estimate and adding, subtracting two standard errors.

Â Slop and the confidence interval endpoints can be exponentiated to

Â get an estimated hazard ratio and its 95% confidence interval.

Â And the cumulative survival through a given time t can be estimated from

Â the results of a Cox regression, but the mathematics requires a computer.

Â And when our predictor of interest is nominal or ordinal categorical, and

Â we were to plot the results from the simple Cox regression,

Â the survival curves estimates first the Kaplanâ€“Meier, they would look similar but

Â may differ slightly.

Â The nice thing about Cox regression above and

Â beyond the Kaplanâ€“Meier is that we can plot specific survival curve estimates for

Â very specific values of the continuous variable, like in our bilirubin example.

Â We didn't have to break bilirubin into groups to present survival curves,

Â which is what we would have had to do if we used the Kaplan-Meier approach.

Â So the Cox allows us, when we have our predictors continuous,

Â to estimate curves for a specific singular value of the predictor.

Â Coursera provides universal access to the worldâ€™s best education,
partnering with top universities and organizations to offer courses online.