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

74 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 3A: Multiple Regression Methods

This module extends linear and logistic methods to allow for the inclusion of multiple predictors in a single regression model.

- John McGready, PhD, MSAssociate Scientist, Biostatistics

Bloomberg School of Public Health

Greetings and welcome to Lecture Set 6.

Â This has a rather long title but it's actually composed of two parts.

Â In Lecture 6A, we're going to give an overview of the idea of

Â multiple regression for estimation adjustment in basic prediction.

Â And then we're going to look in sections B through D at the specific case of

Â Multiple Linear Regression for these purposes.

Â In lecture set 7 and 8, we'll cover the same purposes of multiple regression for

Â a logistic and Cox proportional hazards.

Â So in this letters, set of lectures we will develop a framework for

Â multiple linear, logistic, and

Â Cox proportional hazards regression as I said before in the first section.

Â And then the remaining sections we'll focus on multiple linear regression which

Â is a extension of what we did with simple linear regression and

Â it provides a general framework.

Â For estimating the mean of a continuous outcome based on multiple predictors.

Â Each of which may be binary, categorical, or continuous.

Â So let's first give an overview of multiple regression.

Â So hopefully from this section, at the end of the section, you'll be able to

Â identify the group comparisons being made by a multiple regression slope

Â regardless the outcome variable type, whether we have a continuous, binary, or

Â time-to-event outcome being modeled by the regression.

Â And appreciate that multiple regression allows for both an outcome to

Â be predicted by taking into account multiple predictors with one method.

Â We don't have to look at associations one at a time anymore we can better

Â predict an outcome by taking multiple predictors into the story by one equation.

Â Multiple regression also allows for easy adjustment of a relationship or

Â relationships of interest for potential confounding variables.

Â And it's something we will cover after we lay down the basic framework of

Â multiple regression for these three types is this can be extended.

Â These methods can be extended to also look to

Â effect modification which we'll take on in lecture set 9.

Â And then I want you to realize, and hopefully this is.

Â You could almost do this in your sleep, now you're so used to doing it,

Â is to realize the approach to creating confidence intervals for

Â multiple regression intercepts and

Â slopes regardless of the type of regression, is more of the same.

Â So let's just go back to taking what we did in stat raising one and extending it.

Â So regression provides a general framework for

Â the estimation and testing procedures that we covered in the first term.

Â And as we discussed in lectures 1 through 3, many of the methods from

Â statistical reasoning 1 can be framed as simple, simple regression models.

Â But regression is nice because it allows for extensions, we

Â can add more predictors to our predictor set, and as such, multiple regression.

Â Allows for the extension of the methods from Statistical Reasoning 1 to allow for

Â multiple predictors of an outcome in a single method, and allow for

Â the estimation of adjusted associations relatively easily.

Â As we saw in simple regression already, regression allows for

Â the predictors to be binary, categorical, or continuous.

Â But the ability of a model to predict an outcome or function of an outcome

Â estimated by the model can be improved by using more than one predictor at a time.

Â So here's the basic structure.

Â It's basically going to look like our simple regression models with more Xs.

Â So, I actually queued you a little bit in the simple regression when we did.

Â The multicategorical predictors, we needed more than one X to model that.

Â So in the strict definition it was actually a form of

Â multiple regression because there was more than one X.

Â But there was only one predictor in that model set,

Â it just required more than one X to model it.

Â So I think of it contemp, conceptually as a simple regression.

Â But the basic structure of a multiple regression model will be

Â a linear equation with potentially multiple X's and slopes.

Â So I'll just say it's equal to some intercept beta not

Â hat plus beta 1 hat X1 beta hat 2X 2 onward and upward to.

Â Beta hat P times X P over P is just some number of Xs that we have.

Â And these Xs are the predictors of interest.

Â And the only difference for Cox regression.

Â It'll look pretty much the same but just replace that Beta naught hat

Â with the Lambda naught hat of T in the above equation because in Cox regression,

Â even in the multiple situation.

Â Will have the inner set that will vary as a function of time.

Â So, as with simple linear regression everything stays the same in terms of

Â the left hand side.

Â It's going to depend on what variable type the outcome of interest is.

Â For continuous outcomes, the left hand side, the thing that we'll be estimating

Â as a linear function of our outcome is the mean of this value variable.

Â And we can estimate the mean as a function of multiple predictors

Â by the equation we get.

Â For binary outcomes, the left hand side is the log-ons of the binary outcome.

Â Just like we saw in simple logistic.

Â And then for time-to-event outcomes, the left hand side is log of

Â the hazard rate or incidence rate for the time-to-event outcome.

Â So the right hand side the thing that looks the same.regaurdles of

Â the regression types with that slight switch out for

Â Cox regression on the intercept includes our predictors of

Â interest generically I'll call them x1, x2 up to xP.

Â And these can be binary, categorical or continuous.

Â So the thing that we're going to see here is, we're going to extend the definition

Â of the comparison we make with multiple regression a little more,

Â make it a little more specific than when we had simple regression.

Â Generically speaking,

Â each slope estimates the difference in the left hand side of the equation.

Â For a one unit difference in the corresponding x.

Â That's the same thing we talked about in simple linear regression.

Â The key here is that this comparison, when we have more than one predictor,

Â is adjusted for the other x variables or other predictors in the model.

Â So the associations we get between an outcome and

Â single predictors via the slopes.

Â Will automatically have been adjusted for the other variables in the model.

Â So this gives us a nice framework for

Â looking adjusted associations in the presence of potential confounders.

Â The intercept estimates whatever's on the left hand side, whether it be a mean for

Â continuous data, a log odds for binary data.

Â Or a log incidents rate, or

Â hazard rate for timed event data when all of our x's are zero.

Â So let's just look at a generic interpretation example to start.

Â Suppose we wish to estimate a multiple regression with three x's we've

Â done a study of intravenous drug users.

Â From four cities so this is sort of an international study with

Â four different cities, including Baltimore.

Â We have London to represent Europe.

Â We have Delhi in India, and then we have Capetown in South Africa.

Â So we want to look at some outcome,

Â and, and see how it's related to three predictors at once.

Â One is the sex of the person.

Â The second predictor, which requires three x's because it has four levels and

Â is nominal categorical, is city.

Â So I'm going to make Baltimore the reference group and

Â I'm going to create indicators for each of the other three cities.

Â So x2 will indicate London, x3 will indicate Delhi.

Â X4 in Capetown, and x5 is the age of

Â the IVDU intravenous drug user in the sample in years.

Â So the general rule to model we estimate for any type of outcome would,

Â depending on the outcome, we'd have this left-hand side.

Â Again, this could be a mean, a log odds or log incidence rate.

Â And they'll be equal to some intercept plus some slope times X and

Â then our second predictor, we only have three predictors but we have five Xs,

Â and the way I think of that is our second predictor is city and that requires 3 Xs

Â because there's 4 cities, 4 categories and then our third predictor is a.

Â So just for example,

Â beta one hat here compares the difference in the value of the left-hand side.

Â Remember sex here is coded as one for females, zero for males.

Â So it's the difference for a one unit difference in our x.

Â The only difference, higher to lower, is one to zero.

Â Or females to males.

Â So the slope for sex is the difference in the estimated value of the left-hand side

Â for females compared to males, adjusted for city distribution differences

Â between the sexes and age distribution differences between the sexes.

Â So in other words, this is.

Â The difference in the value of the left hand side for

Â females compared to males of the same city and age.

Â We've removed any vari, variability in those between the sex groups.

Â Beta 5, for example, is the difference in the value of the left hand side for

Â subjects who differ by one year in age, adjusted for sex and city.

Â So of the same sex and from the same city.

Â So this compares whatever we have on the left hand side for

Â a one year difference in age adjusted for those two things.

Â Beta 2 here, remember this is the indicator for

Â London and a 0 if not would be the difference.

Â Between London and the reference city, which is Baltimore, after adjusting for

Â sex differences and age differences between those two sites.

Â So, just a reminder, the metric on which these slopes that will

Â compare the left-hand, if the outcome is continuous or

Â left-hand side, is the mean of some continuous outcome, and

Â the slopes are adjusted mean differences comparing the groups we just discussed.

Â If the outcome was a binary y, a one or a zero,

Â then the slopes are adjusted log odd ratios estimates.

Â And we can exponentiate em them to get adjusted odds ratio.

Â And if the outcome is tied to event where we have some binary y.

Â And which indicates whether an event occurred or censored and

Â then there was the time to go with it.

Â Then the law of left hand side is the log hazard of having an event

Â at a given time and the slopes are the adjusted log hazard ratio estimates

Â If we want to get confidence intervals for our slopes and intercept,

Â if our intercept has relevance to the population from which the sample comes.

Â If it's not a placeholder quantity and

Â we'd be interested in using it to actually quantify some aspect of our population.

Â we, we can get that by the intercept estimate plus or minus two

Â standard errors of the intercept, which will be given to us by the computer.

Â And for any slope, if we have the estimate and the standard error,

Â we can get the confidence interval in the same manner.

Â And this will generally be done by a regression package in a computer, but

Â it's exactly the same idea as almost all other inferences we've done.

Â What about a general approach to hypothesis testing?

Â Well, we'll think of this in the context of slopes, and the high hypothesis for

Â any single slope in the model.

Â Of course, my hypothesis is the null is that the slope of

Â the population level is equal to zero.

Â There is no association between the outcome and

Â this predictor Xi after adjusting for the other predictors in the model.

Â The alternative hypothesis is that the population level association is not zero.

Â In other words there is an association after adjusting.

Â So the general concept of the null hypothesis is after accounting for

Â the information in the other predictors in the model, this particular x,

Â xi is not associated with the outcome.

Â Does not add information about the outcome above and

Â beyond the other predictors in the population from which the data was taken.

Â How would we do this hypothesis test?

Â Well, the same old approach.

Â The general approach is to compute a distance measure.

Â Sometimes it's called T, sometimes Z, but it's always the same computation.

Â Taking our estimated slope, subtracting what we expect it to be under the null,

Â which is zero, though we really just take the estimate and

Â divide by the standard errors of our estimate, our estimated standard error,

Â and that gives us how far in standard errors our estimate is from zero,

Â what we'd expect it to be under the null and, we can translate that into a P value.

Â Something I didn't discuss in simple linear regression, because I

Â just wanted to get the idea off the ground, but something to think about is.

Â When we have multi-categorical predictors like city, ethnicity, etc,

Â that require more than one x to uniquely specify each of the level of the category.

Â If we actually want to ask the, the general question of whether such

Â a predictor on the whole is associated with the outcome,

Â we're going to have to test more than one slope at once with one hypothesis test.

Â So let me just give you an example, in, in this more generic regression model.

Â Let's assume I have bunch of x's but

Â like we did before, one of the predictors is city of interest.

Â And if I want to test whether city or their locational differences,

Â in the outcome at the population level after adjusting for

Â the other things in the model.

Â I can't do it by testing any one slope alone.

Â For example, if I just test beta 2, all I'm going to answer is whether there's any

Â differences between London and Baltimore, the reference group.

Â But I'm not going to actually get in any information about

Â differences between Delhi, Cape Town, and

Â either the reference group or differences between them and London.

Â So if I actually want to formally test whether the predictor city is

Â statistically associated with the left hand side after adjusting for

Â other things, the null I really want to test is that all three slopes are zero.

Â Because if all three slopes are zero, there's no differences between any

Â of the three cities with the x variables and the reference of Baltimore, but

Â additionally we've seen we can if I wanted to for example compare Delhi

Â to London adjusting for other things in the model I could take.

Â Beta 3 minus beta 2, to get the difference between Delhi and

Â London, since neither was the reference group, I can still combine my

Â slopes to get differences between groups that are not the reference.

Â So if all slopes are zero, then all differences are zero, and

Â in other words, there's no differences in the outcome between any of the groups,

Â the cities after adjusting for the other things.

Â And the alternative is that at least one of these three is not zero.

Â And we're not going to talk about the details of how to do this.

Â But we will see output that has a P value doing this sort of test for

Â multicategorical predictors, and I'll explain it in the context substantively.

Â So in summary, multiple regression is a general method for

Â relating an outcome, whether it be continuous, binary, or

Â time to event to multiple predictors with one model or one method.

Â And multiple regression models allow both for better outcome predictions by

Â using more than one predictor at a time and estimation of adjusted associations.

Â In the next sets, we'll look at specific examples.

Â Where our outcome is continuous and we're using multiple linear regression.

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