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

51 ratings

Johns Hopkins University

51 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 3B: More Multiple Regression Methods

This set of lectures extends the techniques debuted in lecture set 3 to allow for multiple predictors of a time-to-event outcome using a single, multivariable regression model.

- John McGready, PhD, MSAssociate Scientist, Biostatistics

Bloomberg School of Public Health

Greetings, and welcome to Lecture Set 8, Section B.

Â In this section we'll give a brief treatise of the basics of model selection.

Â And show how the results from multiple Cox regression, can be presented in terms of

Â estimated survival curves or outcomes from the regression model.

Â So hopefully by the end of this lecture set,

Â you'll appreciate the linearity assumption as it applies to multiple Cox regression.

Â Explain different strategies for

Â picking the final multiple Cox regression model among candidate models.

Â How a researcher might do this, and this process is exactly the same as it was for

Â linear and logistic regression, but it's worth reiterating.

Â Use the results of multiple Cox regression models to

Â compare groups who differ by more than one predictor.

Â And appreciate that the results from multiple Cox regression can be

Â used to estimate group specific survival curves,

Â where the groups are defined by multiple predictor values.

Â So, let's briefly talk about the estimation process for

Â Cox regression, what the computer is doing.

Â The algorithm to estimate the equation of the multiple Cox

Â regression is called partial maximum likelihood estimation.

Â Same process used with simple Cox regression.

Â And what this does, is this uses, this estimates the slopes for our predictors.

Â These are the values that make the observed data

Â most likely among all choices for the slopes.

Â And this is a complex numerical algorithm that has to take some starting guesses for

Â the slopes.

Â And iterate until it finds the choice that

Â maximizes the likelihood of the observed data.

Â But before it does this, this was the, the, what was added by Cox and

Â what makes this method so unique.

Â Is there's a separate behind the scenes algorithm that

Â first estimates the shape or the function over time of the baseline hazard.

Â The one that's going to be used as a starting point at each point in time to

Â get to the hazard for our other groups defined by our X's.

Â And this is actually pretty neat because it doesn't make, force us to make any

Â assumptions about what the relationship between hazard and time looks like.

Â We don't get the opportunity to put in time as a continuous predictor,

Â time as a categorical, etc.

Â But this, the algorithm figures out the general shape, and

Â it isn't restricted to such constraints such that it has to be linear, or

Â it can only change at certain points in time.

Â It can estimate a very dynamic function.

Â But we have to leave that to the computer to do.

Â And then after it does that,

Â it does the maximum likelihood estimation process for the slopes.

Â But this, of course, all of this has to be done by a computer.

Â So what is the linearity assumption in multiple Cox regression?

Â Well, the linearity assumption is similar to what we saw in

Â the simple Cox with the additional part about adjustment.

Â It, it assumes that the adjusted relationship being estimated between

Â the log hazard of the binary event y and whether it's an event or sensory.

Â And each x is linear in nature and this is an issue for

Â continuance predictors, but not for binary or multi-categorical predictors.

Â And as with simple Cox regression, there is no graphical way to assess this.

Â But when fitting models,

Â researchers can compare the results of treating a predictor as continuous.

Â Versus putting it in as categorical to see if there's evidence in the categorical

Â formulation of a consistent same directional change in the log hazard for

Â increasing ordinal categories.

Â And if that's the case, they may opt to treat it as a continuous predictor and

Â estimate one overall association that exploits that relationship.

Â Otherwise, they may present it as categorical.

Â So how do researchers, when they're, when they've got data and

Â they have a bunch of potential predictors, how do they choose a final model?

Â Well, model building, as we've said before, and

Â selection is a combination of science, statistics, and the research goals.

Â So if the goal is to maximize the precision of the adjusted estimates.

Â The strategy, as it was with linear and logistic, would keep, keep only those

Â predictors that are statistically significant in the final model.

Â Do not contribute uncertainty to the model by estimating things that

Â don't need to be there, which then steal from the precision of

Â the things that do actually correlate with the hazard.

Â If the goal is to present results comparable to results of similar

Â analyses presented by other researchers, on similar or different populations.

Â Then in the process of writing this up, researchers would at

Â least want to present one model that includes the same predictor set.

Â As the other research does, even if some of

Â the findings are not statistically significant in this particular data set.

Â Then they can make comparable comparisons in terms of

Â the factors that were adjusted for, et cetera.

Â With the results from the other researchers' findings.

Â If the goal is to show what happens to the magnitude of associations with different

Â levels of adjustment, then a researcher could present the results from several

Â models that include different subsets or combinations of adjustment variables.

Â And if the goal is prediction, well again, this is slightly more complicated story,

Â and we will only be able to discuss it briefly, but

Â we'll touch on it towards the end of the course.

Â So let's look at the idea of prediction with regression results.

Â With Cox regression results.

Â And this is different than with linear and

Â logistic, because we can't actually do this by hand, because we are not

Â presented with any output with what the value of the intercept is.

Â The log hazard at base line, as a function of time.

Â It changes with time, so there's not one value,

Â an intercept, that describes the starting point for all comparisons.

Â So this has to be done by a computer, but

Â let's look at the results presenting some of the results from the predictors of

Â mortality in primary Bilirubin cirrhosis patients.

Â And I'm going to use the results from this model,

Â the one that includes predictors, includes treatment, age, Bilirubin, and sex.

Â To show, based, and I did this with the computer,

Â to show the estimated survival over the followup period for

Â different groups depending on certain characteristics.

Â So this can be done, but

Â it's computationally involved because what the computer has to do.

Â What has to be done is at each point in time, the log hazard for

Â a particular group has to be computed based on the intercept or

Â starting hazard at that point in time.

Â This has to done across the entire time period.

Â And then each of those time specific log hazards have to be converted into

Â cumulative survival estimates, but this can be done by a computer.

Â So for example, I'm not going to present all possible groupings here.

Â But this nice, nicely I think shows that I,

Â the estimated survival curves compliment the results from the Cox regression and

Â turned some of the hazard ratios, put them in the context of what that means in

Â terms of the cumulative probabilities in the follow up period.

Â So what I have here,

Â these two curves down here show the survival trajectories for males.

Â With Bilirubin equal to one milligram per deciliter, who are in the treatment group.

Â And males with Bilirubin of two milligrams per deciliter, so

Â we can see that there's a certainly higher Bilirubin was associated with.

Â Increased hazard, which results in reduced survival.

Â So, like this lower curve is a function of that difference in Bilirubin levels.

Â The two curves up here, are the same comparisons.

Â Subjects in the DPCA group who are female with Bilirubins of one and

Â two milligrams per deciliter, respectively.

Â And what you can see here, pretty clearly, is the same sort of

Â differences in the estimated survivals over time as a function of Bilirubin.

Â But what you also get from this picture is how dramatic the difference is

Â between males and females if you compare these two sets of curves.

Â And so I like this because it actually puts a face,

Â if you will, on what those hazard ratios mean in terms of the decrease in

Â cumulative survival over the follow up period.

Â And it also gives a sense of the magnitude of the difference in terms of predicted

Â survivals, between groups who differ by Bilirubin and groups who differ by sex.

Â It's certainly not an exhaustive presentation.

Â But, it helps to contextualize the results from that Cox regression.

Â We could write out the adjusted model on the regression scale, and

Â write it out in terms of the generic intercept as a function of time.

Â And then the slopes for each of our predictors, I got these from the computer,

Â but you could get these by taking the re, respective logs of the hazard ratios

Â presented in the previous table from the second multiple regression models.

Â So this an indicator here, so

Â one if they're in the drug group, a zero if they're in placebo.

Â Here are our indicators of the three age categories.

Â Remember the reference is the first quartile.

Â X2 is an indicator that the person's in the second quartile.

Â X3 is an indicator that the person's in the third quartile.

Â And X4 is an indicator that they're in the highest or fourth age quartile.

Â This is Bilirubin entered continuously in milligrams per deciliter.

Â And then here is that slope, that negative slope for

Â sex, where it's a 1 for females and a 0 for males.

Â So that's a difference in the log hazard scale which translates into

Â a hazard ratio.

Â On the order of 0.6, and we can see from the previous picture what that means in

Â terms of the difference in survival by otherwise comparable men and women.

Â So suppose that we wanted to use these results to estimate the hazard ratio of

Â mortality for 60 year-old males on

Â DPCA with Bilirubin levels at the start of one milligram per deciliter?

Â And compare them to 40 year-old females on the placebo arm,

Â with Bilirubin at the start of equal to 0.5 milligrams per deciliter.

Â Well if we wanted to do this on the regression scale, we could

Â simply write out the estimated log hazard of mortality at a given point in time,

Â for each of these groups by plugging in their X values.

Â So this was what it looks like.

Â The log hazard, at any point in time, is a function of the starting hazard

Â on the log scale, whatever it is at that point in time, plus the slope for DPCA.

Â Plus the slope for being in the fourth age quartile,

Â because these, the fourth quartile is greater than or equal to 57 years and

Â these males are 60 years-old, so they're in their 4th quartile.

Â Plus the slope for Bilirubin times their starting level,

Â which is one gram per deciliter and then because they're male.

Â Their x value for sex is 0, so they don't pick up anything for being male.

Â And when you write this out in terms of the baseline log

Â hazard at any given time and then the cumulative impact of these other things.

Â We get that the sum is equal to whatever the baseline hazard is on

Â the log scale plus 1.12 if you add up these three numbers.

Â If we do the same thing for females who are 40 years-old and

Â in the placebo group with Bilirubin levels of 0.5.

Â Then the log hazard is equal to the same starting log hazard at the comparable

Â time that we're making a comparison, which could be anytime in the followup period.

Â They're in the, de-

Â they're in the placebo group, so their value for pe-,

Â indicator of treatment group is zero, so they don't get anything for that.

Â They're in the lowest age quartile, so they don't pick up anything for

Â age because they're the reference there.

Â The Bilirubin level's 0.5, so we take the slope for

Â Bilirubin, 0.15 times 0.5, and because they're female.

Â Their x1 for sex is a 1 and the slope for that is -.51.

Â So when we combine the slope values into a sum,

Â we get that the estimate at any given time, is found by

Â taking the log of the baseline hazard at that time plus -.435.

Â This is the cumulative impact of having the Bilirubin level of 0.5 and

Â being female.

Â So if we actually took the differences in these estimates, for

Â males 60 years old on DPCA with a Bilirubin of 1.

Â That's this part here, and we subtracted what we get for females.

Â If you do this,

Â the difference in the estimated log hazards at any given time is 1.555.

Â And if we exponentiate that, we get a hazard ratio of 4.74.

Â So male, 60 years-old in the drug group,

Â with starting Bilirubins of 1 milligram per deciliter.

Â Have 4.74 times the risk of

Â mortality at any given time in the followup period when compared to females,

Â 40 years-old in the placebo group with a Bilirubin level of 0.5.

Â And so this difference is the,

Â it's the culmination of the increased risk for being male.

Â The increased risk for being older.

Â The slightly increased risk for being a DCPA group, and being increased risk for

Â having higher Bilirubin, compounds into a hazard ratio 4.74.

Â Just want to show you something, certainly a lot of times in

Â papers they will not give you the results on the log scale.

Â And you could certainly take the logs with respect to hazard ratios and

Â write out the equation.

Â But I wanted to show you this.

Â If we, instead of actually mashing these together into one sum,

Â I keep the component separately in this comparison.

Â The difference between these two groups because of the difference in

Â treatment groups is 0.1.

Â That's because the males were in the treatment group and the females were not.

Â The difference between these two groups, because the age difference is 0.87.

Â The males can add that additional 0.87 to their hazard, because they were in

Â highest age quartile, compared to females who had no additional above and

Â beyond the baseline because they were in the reference category, lowest quartile.

Â The difference in Bilirubin levels is 1 for the first group, minus 0.5 for

Â the second group.

Â And so the Bilirubin contribution to this sum has to be the difference between

Â the two groups, is the slope of bilirubin times that difference.

Â And then the first group is male, so the get a value of zero for sex, but

Â the second group is female, so they get a value of negative 0.51.

Â Because their sex value is 1.

Â And so, these are the components that if we wrote this out,

Â equals that 1.555 we saw before.

Â But if you exponentiate this in its component parts, and

Â do a little mathematics you can see that it's the product of E to the first thing,

Â the slope for being DCPA.

Â Times E, the slope for

Â being in the older, oldest age quartile compared to the youngest.

Â Times the slope for being, for Bilirubin exponentiated raised to the 0.5 power,

Â because that's the difference in the Bilirubin levels for these groups.

Â Times E to the 0.51, which is the opposite of the slope for being female.

Â And what this turns out to be on the product scale is.

Â The adjusted hazard ratio for being in the DPCA group, compared to

Â the placebo group, times the adjusted hazard ratio from that table before.

Â Being in the oldest age quartile compared to the youngest.

Â Times the adjusted hazard ratio for a 0.5 difference.

Â And Bilirubin times 1 over the adjusted hazard ratio for being female,

Â because we're comparing in the opposite direction that that hazard ratio compares,

Â taken at face value.

Â In this example we're comparing males to females.

Â So you can actually get this kind of comparison based on

Â the adjusted hazard ratios just by multiplication.

Â And for things that are continuous, the hazard ratios that represent a per

Â unit change in the continuous variable like Bilirubin.

Â Taking that hazard ratio in the multiplication and raising it

Â to the difference, in that continuous value between the groups being compared.

Â So you don't necessarily have to, if you're reading a paper and

Â are interested in doing such a thing you can do it

Â directly from the results via this type of multiplication.

Â Its just an FYI.

Â Just shows how the math works.

Â So let's look at one more example of prediction with Cox regression.

Â We looked at several models, unadjusted associations, and

Â then two different adjusted models, looking at predictors of infant mortality.

Â And we found in the first lecture that pretty much the only two things among our

Â candidate predictors that were associated with infant mortality,

Â were gestational age and maternal parity.

Â And they each contribute independent information.

Â Neither of their adjusted associations was different than their unadjusted.

Â But let's just look at what the results would look like if presenting different

Â estimated survival curves for these inference based on gestational age and

Â two different parity categories, to look at the impact of parity above and

Â beyond gestational age.

Â So I put these curves next to each other,

Â and they just give some sense of what's going.

Â What I have here, in this presentation,

Â are the five estimated survival curves for the gestational age groups.

Â Amongst first born children,

Â amongst the group of children whose mothers had not had any previous children.

Â And we see clearly that big jump here's the pre-term group, less than 36 weeks.

Â And then here are the four other groups, and there's actually one is right on

Â top of each, so it looks like there's three curves, but

Â pretty much the story of gestational age shines through here.

Â That pre-term is really a risk factor for mortality.

Â And that reduction in hazard shown with full-term translates into

Â an estimated difference in probabilities of survival on the order of ten or

Â more percent in the follow up period.

Â So it's pretty dramatic.

Â If we look at the same presentation here, but

Â instead of looking at first born children we look at second born children.

Â You'll notice, if you compare that this is on the same scale, so

Â if you compare these curves to the curves over here, they all shift up a bit.

Â There's still a, quite a disadvantage in terms of increased risk and

Â decreased survival.

Â Of being pre-term in this curve again,

Â is very distant from the other gestational age categories.

Â But there is a benefit in terms of decreased risk and

Â increased survival of being the second born child compared to the first.

Â So you see these curves here on the same scale are shifted up,

Â at least relative to their counterparts among the firstborn children.

Â So, this kind of presentation, it's nice when authors do it.

Â It leaves for some of the groups just to sort of ground our understanding of what

Â the underlying cumulative survival looks like over the follow-up period.

Â And that helps us take those hazard ratios and

Â translate them into understanding about what it means in terms of

Â cumulative differences of survival between groups across the follow up period.

Â So in summary, multiple Cox regression results can used to

Â estimate cumulative survival curves of time to event outcomes.

Â For a given subset in a population, given the subset's predictor values.

Â Obviously we can't do this by hand, and you wouldn't be

Â expected to be able to recreate any of those given the equation for

Â Cox regression, but I just want you to be aware that this can be done.

Â So if you're working in a research group, and thinking how about,

Â how to present, present your results in a paper or a report.

Â You may advocate for publishing some estimated survival curves above and

Â beyond presenting the results from a multiple Cox regression to

Â contextualize what the impact of these predictors are,

Â in terms of the cumulative probabilities of survival over the follow up period.

Â And multiple Cox regression results can be used to estimate hazard ratios between

Â groups who differ by more than one characteristic.

Â And we looked at one example of that and

Â it was a very similar approach to what we did with linear regression except that

Â the results on the regression had to be exponentiated.

Â And it's analogous to what we did with logistic regression,

Â because we were dealing with log ratios on that scale as well in terms of the slopes.

Â Confidence intervals for these comparisons can be estimated.

Â But they need to be done by the computer because the standard error for a hazard

Â ratio and the law of hazard ratio that represents a comparison on multiple x's.

Â Has to be estimated by the computer, and it can't easily be done by hand, but

Â the idea is exactly the same.

Â If you get a confidence, if somebody gave you the standard error,

Â you could get a confidence interval estimate by taking the log as you add and

Â subtract in two estimated standard errors and exponentiating the result.

Â In the next section, we'll look at some examples of Cox regression used in

Â published articles from the public health and medical domains.

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