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

In this section we're going to look at a simple regression method for

Â when we have time to aventate it with the, in the presence of sensory.

Â And this something in it's full name called Simple Cox Proportional Hazards

Â Regression, frequently abbreviated as Cox Regression.

Â And it's named after it's inventor Sir David Cox, an English statistician.

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

Â simple Cox proportional hazards regression.

Â Which is a method for relating a time-to-event outcome in the presence of

Â sensory to a single predictor that can be binary, categorical or continuous.

Â So at face value it's like the other two regressions we've looked at.

Â Where we're relating outcome or

Â function of an outcome to a single predictor by a linear equation.

Â So in this first section, we'll just set up the idea of Simple Cox Regression.

Â And something that comes out in its full name,

Â proportional hazards, we'll define that concept.

Â So after viewing this lecture section,

Â hopefully you will be able to interpret the slope of a predictor.

Â From a Cox regression model as a log hazard ratio.

Â And explain the concepts of proportional hazards and

Â what it means with respect to interpreting the slope.

Â And exponentiated slope from a Cox regression model.

Â So for Cox proportional hazards regression,

Â the equation is similar to logistic regression with an extra piece.

Â What this regression does is model the log risk called Hazard.

Â And we'll define Hazard more formally.

Â But log risk of a binary outcome y as a function of our predictor x1.

Â And also, the follow up time.

Â We'll just call that generically t.

Â Remember, what we're doing with timed events studies is following subjects from

Â time 0, when they start the study, over time.

Â To see if they have an event of interest or

Â if they make it to the end of the study without having the event.

Â Or if they drop out with having, without having the event.

Â So there's potential for some censoring.

Â What this model does is it estimates the log of what's called the hazard of

Â our binary outcome.

Â At any given time in the followup period time t generically is a function.

Â It looks like an intercept, but it depends on where we are in the time.

Â So you'll na, name this lambda hat of t,

Â evaluated at t plus a slope times our predictor.

Â So this slope times predictor looks like any other regression we've seen.

Â The only difference with Cox now is that our intercept piece depends on

Â where we are in the followup period.

Â And we'll delve into this more deeply in a few slides.

Â But, so as with linear and logistic regression our predictor x1

Â can be binary, nominal categorical, ordinal categorical, or continuous.

Â So let's just define this idea of hazard.

Â Hazard, in the English language, is synonymous to some degree with risk.

Â But, technically speaking, what hazard means in timed event studies.

Â And we were estimating a function of the hazard when we did the Kaplan-Meier curve,

Â but we didn't call it as such.

Â But what hazard is is the instant risk, instantaneous risk

Â of having the binary outcome at a given time in the follow-up period.

Â It's the risk of having the event among those who are at

Â risk of having the event at this time in the follow-up period.

Â So it's sort of at a given time,

Â it estimates among those who were still in the study.

Â Have not dropped out or had the event previously to that time.

Â It's the risk among those of having the event at that spetif, specific time.

Â So for interpretation purposes, we can think of the hazard as

Â the time-specific risk of having the event of interest.

Â So essentially, it's synonymous with risk.

Â So, let's look at what this equation gives us then.

Â It says the law of this time specific risk at

Â a specific time is equal to some intercepted depends on

Â the time plus the business as usual slope times of predictor.

Â So just like in any other we rush we looked at linear logistics the slope.

Â And we'll show it exclusively compares the difference in the law

Â of Hazard between two groups who differ by one unit in x1 at the same time point.

Â And this slope measures or quantifies this difference in

Â the law of Hazard between an, any groups who differ by one unit in x1.

Â Regardless of what time in the follow up period we're comparing their risk at.

Â Or their log risk.

Â So let's just give an example.

Â Suppose x1 is binary for sex.

Â We only have two groups who we'll be comparing in the follow up period and

Â let's just arbitrarily make x1 a one for females and a 0 for males.

Â So let's see what this model estimates for

Â both groups at a specific time in the follow-up period.

Â Let's say t equals one month.

Â So the log hazard of the binary outcome for females at

Â one month in the follow-up period is equal to this function, this intercept.

Â I'll call it lambda naught.

Â Its value when t is equal to 1 plus our slope times x1, which is equal to 1.

Â The same estimate, but for males, when x1 is equal to 0,

Â is just this intercept if you will evaluate it at time 1.

Â So this intercept function, if you will, estimates the log risk of

Â having the event, at that given time, for this reference group of males.

Â And so, if we take the difference of these estimates, this piece cancels, and

Â all we're left with is the slope for sex.

Â So this slope for sex, at least in this particular case, estimates

Â the difference in the log hazard of the outcome for females compared to males.

Â At one month of follow-up.

Â But we'll see,

Â regardless of the follow-up time, let's look at another example, 50 months.

Â We looked at 50 months in the follow-up period, assuming our study went on for

Â at least 50 months.

Â The estimated log hazard of the outcome for

Â females at 50 months is equal to this intercept function evaluated at 50 months.

Â Lambda naught evaluated at 50 months plus our slope times 1.

Â And for males, they are the reference group.

Â So essentially this intercept evaluated at 50 months estimates the log hazard

Â of the binary outcome when x equals 0 at that time.

Â So again, if we look at the difference in the estimated log hazards between the two

Â groups we take the top and subtract the bottom.

Â This piece cancels and again we're just left with this same slope.

Â So, notice we could go back and do this for other times in the follow up period.

Â But notice that regardless of what the log hazard is for

Â males, this intercept piece evaluated at a specific time.

Â The corresponding log hazard for

Â females at the same point in time, the same point in the follow up period.

Â Is this log hazard for males at the same time, plus this slope.

Â So in other words, the difference in the log hazards for females compared

Â to log hazards for males at, at the same time regardless of the time is this slope.

Â So what is this lambda hat of naught of t?

Â Well, we've alluded to this in my verbiage before but

Â think of this as a time specific intercept.

Â At any given time in the follow-up period, this is the starting log hazard that, for

Â the reference group, that we add the slope beta one hat to.

Â To get the time specific risk for,

Â in this case, females since we only had two groups.

Â Defined by In x equals 1 females or 0, the reference group, males.

Â So what this function does is estimates the log hazard for the reference group

Â over the follow-up period as a function of time when x1 is binary.

Â So what does this look like?

Â Well, if we were to think about on the log hazard scale.

Â Looking at the.

Â Function of time-specific risks over the followup period for

Â males, this doesn't have to be.

Â This can jump all over the place.

Â The risk on a lot of stuff can go up for

Â males, it can come down at any given point in time.

Â Go back up I'm just making this up.

Â I don't have any data to support this particular manifestation.

Â But what this tells us then if this is lambda naught t as a function t.

Â What this regression is telling us is to get the same function estimate over time

Â for females, at any given point in time for males, add beta 1 here.

Â I'm assuming beta 1 is positive.

Â It doesn't have to be.

Â And so what these functions will look like, and

Â I'm going to try and draw this to scale, is they will be

Â parallel functions on the log hazard scale.

Â In other words, the difference between the log hazard for

Â males, given by this red curve, and females, given by this blue curve.

Â At any point in the follow-up period is that slope beta 1 hat.

Â So think about it, beta 1 hat estimates the difference in

Â log hazards between males and females at any given point in time.

Â So difference in log hazards, log hazard.

Â I'm just abbreviating this for females minus the log hazard for males.

Â At any given point in the follow-up period can be reexpressed

Â as the log of the hazard or risk.

Â For females, compared to the hazard or risk for males.

Â So this is the log of risk or hazard ratio.

Â If we exponentiate this.

Â We get what's called a hazard ratio.

Â Which is essentially a risk ratio of the outcome from females compared to

Â males at any given time in the follow up period.

Â So what this means or not it's going to be difficult to draw.

Â But on the hazard scale.

Â So if we exponentiated those curves that I looked at before on the hazard scale.

Â Let's suppose this if for males.

Â Now this is not drawn to what I drew before, but this is males.If I

Â were to actually draw the spore responding hazard curve, for females.

Â And I'm not going to draw this to proportion, I apologize.

Â But, it would be such that these are no longer

Â necessarily in a constant difference, but the ratio.

Â And I did not draw this well, but

Â the ratio of the Hazards between these two groups at any two points.

Â Between these two groups at any point of time is equal to e of the beta one-half.

Â So, on the exponentiated scale things that are, have a constant difference

Â on the log scale are in a constant ratio on the exponentiated scale.

Â This is the idea of proportional hazards, that regardless of what the risk is for

Â males at any given time in the follow-up period.

Â The risk for females is always the same multiple the risk for

Â males, e to the beta 1 times that risk for males.

Â Regardless of where we are in the follow up.

Â So in other words, the relative risk for

Â females to males at any given point in the follow up period is e to the beta one hat,

Â regardless of what the starting risk for males is.

Â So this constant difference in the log hazards between females and

Â males, regardless of the comparison time.

Â And hence, the constant ratio of the hazard for

Â females to males regardless of the comparison time.

Â Is an example of the idea of proportional hazards.

Â The baseline hazard.

Â And hence the log of hazard that we're estimating on the regression scale here is

Â for males.

Â And this can vary over time, as can the hazard and hence log hazard for females.

Â But the ratio of the hazards between females and

Â males is constant regardless of time.

Â And this translates into a constant difference, or slope.

Â On the log Hazard scale.

Â Let's look at another example.

Â Let's make our predictor now continuous.

Â So slopes again are interpretable as the difference in the log hazard per unit

Â difference in x1 at a given time in the follow up period.

Â But if x is continuous.

Â Still that same interpretation it's just we have more potential groups we can

Â compare for values of x.

Â So suppose x1 is age in years at the start of the study.

Â So let's just interpret our slope in this situation.

Â So let me postulate here in a specific time in the follow up here.

Â Let's say one year follow up.

Â Let's compare two groups,

Â the log hazard of two groups who differ by one year and age.

Â So I'm going to generically make the ages a and

Â a plus 1 to indicate the one year difference.

Â So the log hazard of our outcome being one, for

Â the older group at one year, is equal to this.

Â Intercept function at one year, plus our slope times their age.

Â For the group that's one year younger, it's the intercept part evaluated at

Â the same point in the follow-up period, plus the slope times their age.

Â If we take this difference, this intercept piece at time one year will cancel.

Â And this part here is equivalent to beta one hat times a, plus an extra beta

Â one hat, so if we take that difference, all we're left with again is the slope.

Â So this slope estimates the difference in the log hazard of our outcome for

Â two groups who differ by one year in age.

Â At the first year of follow-up.

Â Suppose we go and look at them, again, and we compare them.

Â Remember year of age does not change over time because it's

Â their age in years that the study starts.

Â So if we look at 4.5 follow-up here at a time.

Â Well, the only thing that would change in this comparison is the intercept piece.

Â Which would now be a function evaluated at 4.5 years, and

Â that were pertained to both groups.

Â So if we again looked at the difference in the log hazard between those two groups,

Â they differ by one year of age.

Â It would be Beta One hat again.

Â So notice that regardless of what the log hazard is for

Â x1 equals 0 as it potentially varies as a function of age.

Â The log hazard of two groups who differ by one year in age compared at

Â any point in time in the follow up period, the difference is beta 1.

Â We take the log hazard of the younger group.

Â At the start of the study, and add beta 1 to it to get the log hazard of

Â the older group by one year at that same time in the follow up period.

Â So what is this lambda hat of naught evaluated a given time t?

Â Well think of this again as a time specific intercept, but here when x is

Â continuous, this at any given time, this is sort of the starting log hazard.

Â That we add multiples of the slope to to get an age specific log hazard at time t.

Â And again age is measured at baseline.

Â So technically, this is the log hazard as a function of time t for

Â persons who are 0 years old at the start of the study.

Â Depending on the population we're looking at, and hence the sample we have,

Â this may or may not describe a specific age group in our sample.

Â So this may just be a place holder.

Â Like an intercept for, for a logistic or linear progression when x was continuous,

Â but this intercept or this place holder will vary as a function of time.

Â So if we were to look at a picture,

Â we might have something like this on the log scale.

Â If we, this is our, our function or log hazard.

Â For people with x 1 equals 0.

Â If we were to plot for various other ages like 30 years old.

Â The shape would be the same.

Â And the difference between any two.

Â Curves over time for two groups who differ

Â by one year in age would be beta 1 hat.

Â And for multiples of age, so 32 this reference group of times here,

Â this is not drawn to scale, would be 30 beta one hat.

Â But that difference would be constant, on the log risk scale,

Â at any point in time on the follow-up period.

Â So as such, the slope estimates the difference in the log hazard,

Â for any two groups who differ by one unit and x1.

Â At a specific time the difference in law hazard is equivalent to

Â the law of hazard ratio.

Â So when x1 is continuous to exponentiated the slope either the beta 1 hat

Â gives the estimated hazard ratio of the outcome for two groups.

Â Who differ by one year in age at any given time in the study follow up period.

Â So this constant difference in the log hazards between groups who differ and

Â one or more years of age.

Â Our x1 variables and hence the constant ratio of the hazard for two such

Â groups regardless of the comparison time is an example of proportional hazards.

Â The baseline has for in this example were x1 continuous.

Â And hence the log hazard which we're estimating on

Â the regression scale is a potentially theoretical group.

Â Those who are 0 years old at the start of the study, but nevertheless the ratio of

Â the hazards between different age groups is constant regardless of time.

Â So in summary, Cox Proportional Hazards regression allows for

Â the estimation of a log hazard ratio.

Â And hence a hazard ratio comparing the hazard or

Â risk of the outcome over the follow up period.

Â Between two groups who differ by one unit in the predictor x one.

Â This model assumes and hence estimates a result.

Â Under the assumption that the relative hazard to hazard ratio of the outcome for

Â any two groups being compared is constant across the entire follow up period.

Â And hence on the log scale, the difference in

Â the log hazards is constant across the entire follow up period.

Â In the next several sections, we'll look at some examples with real outcomes and

Â real data.

Â And estimate hazard ratios and

Â put confidence limits on them so we can put this in a substantive context.

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