So, in this lecture section, we'll follow up on what we did in the previous section and look at confidence intervals for binary comparisons part two, and we'll look at the confidence interval for the ratio based comparisons, that we've seen relative risks and odds ratios. So, upon completion of this lecture section, you will be able to estimate 95% confidence intervals for relative risks and odds ratios by hand if you wish, but we'll certainly be using the computer to get that for most situations. But what we'll be doing just to recall from the first lecture section in this lecture set, as I talked about having to do our computations on the log scale. So, we'll actually be taking the log of observed ratios and adding and subtracting two estimated standard errors of the log of the observed ratio, and we'll show how to estimate that based on the values and setting up our results in a two-by-two table, and will be able to explain the relationship between the null value of zero, for confidence intervals on the log scale, and then the resulting null value of one on the ratio scale. So, what we'll do in the end is once we get our confidence interval on the log scale, we'll antilog or exponentiate back to the ratio scale. So, the null value on the log scale is zero, the exponentiated value of zero is one, and that will be the null value on the ratio scale. Then we'll also explain how the confidence intervals for all three measures of association we have for binary comparisons, difference in proportions, relative risk, and odds ratio estimated from the same data sample, how they should agree in terms of their resulting decision about statistical significance, and whether they include or don't include the respective null values. We'll see that not only do our estimates agree in the direction of association as we've seen before, but all our confidence intervals will yield the same conclusion about including or excluding the null value of relevance. So, let's start with the study we know. So well, this random sample of 1,000 HIV positive patients from a citywide clinical population, and looking at the percentage of persons who responded to antiretroviral therapy based on their baseline CD4 count. We've seen several times now, of the 503 subjects who had starting CD4 counts of less than 250 cells per millimeter cubed 25 percent responding, of the other 497 subjects who had CD4 counts greater than or equal to 250 cells per millimeter cubed, 16%, 9% percent fewer, responded. So, we know the risk difference in the direction comparison for the first group the lower CD4 count group to the second is 9%. We know well that this result was statistically significant, as the confidence interval for the true population level difference in response only included positive values and did not include zero. We also know and we've computed previously the relative risk. In this direction of comparison, the relative risk of response for the CD4 count group less than 250 compared to the CD4 count greater than or equal to 250, and that was 1.56. So, again the estimates agree in the direction of the association, 9% higher proportion responding on the absolute scale, 56% higher proportion responding in the first group compared to the second on the relative risk scale. On the odds ratio scale, we also get a good treatment with direction of association in odds ratio 1.75 indicating 75% greater odds of responding, for the first group, the lower CD4 count group compared to that second group. So, what we're going to show now is how do we get confidence intervals for these two pieces, and then we'll look at how the results compare in terms of conclusions about statistical significance with the confidence interval we already have here. So, in order to get the confidence interval for our ratios, as I said before, we're going to have to take things to the log scale. So, to start our observed relative risk in this study, comparing the risk of response for the lower CD4 count to the larger CD4 count is 1.56. To start, we'll need the natural log of that value which is 0.44. This ratio is greater than one, so we knew that the log would be greater than zero now we know it's equal to 0.44. So, the question is, how are we going to get the standard error for this natural log of the relative risk estimate? I'm going to show you on the next slide. It's actually a pretty straightforward computation if we set up our data, in a two-by-two table format. The one thing to note if we're doing this by hand, is we want to set things up such that we track the outcomes of interest, in this case, response or not responding to therapy in the rows, and our groups that we're comparing are tracked in the column. So, that would be the CD4 count group less than 250, and the other CD4 count group greater than or equal to 250. The numerator of our comparisons, the first group should be in the first column, and the denominator in the second. So, it turns out the standard error of our log relative risk is a function of the number of people who have the outcome in both of the groups being compared and the total number of people in each group. So, the group one contribution to the standard error as we take one over the total number of persons who had the outcome in group one, and subtract one over the total number of persons overall in group one. In the group two component is similar, we take one of the number of persons who have the outcome in group two, minus one over the total number of persons in group two. So, notice this, each of these two components will always be positive. A will always be less than A plus C, and so one over A minus one over A plus C will always be greater than zero, it will always be positive, and one over B, will be minus one over B positive will also be greater than zero by the same logic. So, we're taking the square root of the sum of two things that are positive. So, it always will exist. We won't get the square root of a negative value under this computation. So, if we do this for our data with the response to treatment by CD4 count, again the log of our observed relative risk is 0.44. We set up this two-by-two table. Of the 503 people who had CD4 counts of less than 250 at baseline, 127 responded. So, the contribution to our standard error of the log relative risks for that group is 1/127 who responded minus one over the total number, 503. Then, for the second group, the group in the denominator, the CD4 count greater than or equal to 250, there were 79 persons who responded to treatment of the 497 total in that group. So, that's our piece for group two there. When we do out the Math, the standard error estimate for these data, for the log relative risks for these data is 0.13 on the log relative risk scale. So, again, getting the confidence interval for this ratio of this relative risk is a two-step process. We first have to do our computations on the log scale. So, we'd seen previously, when we took the log of a relative risk estimate which was 1.56, the log 1.56 is 0.44. So, that's our estimate on the log scale. In the previous slide, we showed the estimated standard error for the log of this relative risk estimate was 0.13. So, now we have an estimate of the standard error. It's on the log scale, but we know what to do. We're going to take our estimate, and add and subtract two standard errors to get the 95 percent confidence interval for the relative risk on the log scale. In other words, the 95 percent confidence interval for the log relative risk. If you do out the Math, this goes from 0.18 to 0.60. So, notice that this interval does not include the null value for log ratios. The null value of zero. How do we get this onto the relative risk or ratio scale? Well, all we actually have to do is anti-log this, or exponentiate the results to get the confidence interval on the relative risk scale. So, doing this gives us, if we take e to the lower bound of the estimated confidence interval along scale, e to the 0.18. Then, for the upper estimate, upper bound on the ratio scale, we take e for the upper estimate on the log scale, e to the 0.6, we get a confidence interval for the relative risk that goes from 1.2-1.82. So, as we noticed on the log scale, the confidence interval did not include the null value for the log of ratios of zero. Consequently, on the exponentiated or ratio scale, the confidence interval for the relative risk itself does not include the null value for ratios of one. So, putting this all together, our estimated relative risk was 1.56, and now we have this confidence interval to go with it of 1.2-1.82. So, how could we wrap this up scientifically and use these numbers to explain what's going on? We can say something like, based on the results of this study, HIV positive individuals with CD4 counts of less than 250 at the time of starting therapy have a 56 percent greater risk or probability of responding to therapy, when compared to HIV positive individuals with CD4 counts of greater than or equal to 250 at the start of therapy. So, it sounds a little straight to say, greater risk of response, because the response is a good thing, but technically, we were used to using risk colloquial for harmful things, but it can be used to describe good things as well. But, if you prefer, you could say, 56 percent greater chance or probability of responding. That gives us a verbal treatise of the estimate in a scientific context, but we wanted to bring in the results of the confidence interval. As well, we can say something like, additionally, these results estimate that this increase in response probability could be as small as 20 percent, and as large as 82 percent. That just comes from this confidence interval 1.2, indicating a 20 percent increase to 1.82 which indicates that 82 percent increase. So, a fair amount of uncertainty around the relative risk, but all signs point to an increase. Even on the lower end, we're talking about a 20 percent increase in response for those with lower starting CD4 counts at the time of being given the therapy. So, guess what? We're going to do almost exactly the same thing for odds ratios. Conceptually, it's exactly the same. The only thing that's going to change is how we estimate the standard error of the log odds ratio. So, in this same study of odds ratio response for those who had lower CD4 counts compared to those who had higher CD4 counts when they receive their therapy was 1.75. We take the log of this, the natural log of 1.75 is 0.56. So, all we need to go along with this is a standard error for this estimate to get a confidence interval for the log of the odds ratio. So, it turns out similar to the log relative risk estimate, the standard error for the log odds ratio is a function of the, if we were to set this up in a two-by-two table, a function of all four cells of the two-by-two table. It's a little easier to remember, although I wouldn't expect you to remember any of these formulas, but this one sticks in my head because it's pretty straightforward. The standard error of the log odds ratio from a study, any given study comparing binary outcomes between two groups. When you set it up in the two table format, is just the square root of one over the first cell count, plus one over the second cell count, plus one over the third cell count, plus one over the fourth cell count. One over a, plus one over b, plus one over c, plus one over d, and then the square root of that sum. In this example, we do the Math on this, the standard error for this log odds ratio of 0.56 is 0.16. So, now it's business as usual. The same approach we used for getting a confidence interval for the relative risk, we're doing this for the odds ratio. Since it's a ratio, we start on the log scale. So, we take log of odds ratio which we said was 0.56 plus or minus two standard error estimate. Estimate the standard errors of that log odds ratio, two times 0.16, and we get a confidence interval for the odds ratio on the log scale 0.24 to 0.88. Notice, this also does not include the null value for ratios on the log scale. The null value in the log scale is zero. Of course, if the result was statistically significant based on the relative risk, it should also be statistically significant based on the odds ratio since it's based on the same data. So again, the confidence interval for ratio or relative risk and odds ratio, or as we'll see in the next section, incidence rate ratio is a two-step process. We first have to do our computations on the log scale. We take the log over estimated ratio and add and subtract two estimated standard errors. That's the same process of we've all used. Estimate plus or minus two standard errors, except it's on a different scale than the ultimate results we want to present. So, to get it off the log scale and to present the confidence interval endpoints on the ratio scale, we need to then exponentiate our results. Of course if we wanted to present this and better explain it scientifically, we're going to take this back off the log scale, and put it on the ratio scale by exponentiating these confidence interval endpoints. So, we get a confidence interval for the odds ratio that goes from 1.27 to 2.41. We estimated odds ratio was 1.75. So, if we were to put words around this, we could say something like, based on the results of this study, HIV positive individuals with CD4 counts of less than 250 at the time of starting therapy have 75 percent greater odds of responding to therapy when compared to HIV positive individuals with CD4 counts of greater than or equal to 250 at the start of therapy. Additionally, these results estimate that this increase in response odds could be as small as 27 percent, and as large as 141 percent. So again, Fair amount of uncertainty in this estimate, but all signs point to an increased response for those with lower CD4 counts upon receiving the therapy. On the lower end, it's still relatively sizable at 27 percent. So, let's put these three estimates and their confidence intervals together. We've already said that the estimates look different in terms of their magnitudes, especially when comparing the difference ones to the ratios, and that will be the case in terms of the magnitude on the confidence interval scale. But, let's look at some consistencies here. All three of none of these, three confidence intervals include their respective null value. So, whether we quantify this association with a risk difference, a relative risk on odds ratio, we get the same conclusion with regard to statistical significance. The result is statistically significant with all three approaches. The results should be consistent in terms of their assessment of statistical significance regardless of how we compute the association. So, we will always see that consistency in terms of the results we get from the confidence intervals for the three measures of association. Let's look at another example and compare the results across the three measures of association. So, this is the randomized trial, HIV positive pregnant women who randomized to receive AZT or placebo during pregnancy and of concern was the proportion of children who developed HIV within 18 months after birth. We've seen several times before that the results were pretty striking in terms of the sample results. Seven percent of the 180 children born to mothers who were given AZT developed HIV compared to 22 percent of the 183 mothers who were given placebo. So, if we look at this in terms of the comparison of the AZT group to placebo, we've seen that the risk difference was negative 15 percent with a confidence interval that went from negative 0.22 to negative 0.808. So, did not include the null value of zero for differences. So, this was statistically significant by this comparison. For the relative risk, the comparable relative risk was 0.32. Again, indicating a lower proportion with the outcome in the first group compared to the second. There's numbers less than one, if we take the log of it, it's negative 1.14. The odds ratio for the same comparison was 0.27. The log of the odds ratio was negative 1.31. So, if we did things I won't go through the details of the computation, you can set this up in a two-by-two table if you wish and see what you get. But we'll just jump to the punchline here is that the estimated standard error based on these data for the log relative risk is 0.30. We do the computation for the confidence interval of the relative risk in the log scale. We take the log of observed relative risk data of 1.14 plus or minus two times that estimated standard error. We get a confidence interval for the log relative risk of negative 1.74 to negative 0.54. So, all possibilities for the true association on the log relative risk scale are negative. This does not include zero, the null value for log ratios. But of course we would want to present the results back on the scale of interest the relative risk scale. So, we'd exponentiate these end points from the log confidence interval. From the confidence interval log scale and we get a 95 percent confidence interval for the relative risk of 0.18 to 0.58. Notice that this corresponding interval and the relative risk scale does not include the null value for ratios of one. So, how would we explain this scientifically? Well, the observed relative risk was 0.32, so we first talk about that and we say an HIV positive pregnant women could reduce her risk of giving birth to an HIV positive child by 68 percent if she takes AZT during pregnancy. Studies result suggest another confidence intervals rather wide, but even in the worst-case scenario, we're talking about reduction and I say as small as, but it's still a very sizeable reduction of 42 percent. On the other end, it could be as large as 82 percent. So again, pretty convincing evidence that there's the statistically and scientifically significant impact of treating HIV positive pregnant women with AZT. For the odds ratio, the confidence interval and the log scale, we start with the log of observed odds ratio of negative 1.31. The estimated standard error for the log odds ratio can verify it. If you wish, it was 0.34 and the resulting confidence interval for the log odds ratio was negative 1.99 to negative 0.63. So, this also does not include the null value on the log scale of zero. We're exponentiating the results to get for the log odds ratio. So, it should be odds ratio. The results are on the odds ratio scale 0.14 to 0.53. Again, when exponentiated, the results on the odds ratio scale do not include the null value for ratios of one. So, how can we explain this? To our audience, we can say AZT is associated with an estimated 72 percent reduction in the odds. We want to be clear that this is comparing the odds, not the direct comparison of risks that we get from the relative risks. This is comparison of the odds. So, estimated 72 percent reduction in the odds, are giving birth to an HIV infected child among HIV infected pregnant women. Study results suggests that this production nods again sort of in air quotes could be as small as 47 percent and as large as 86 percent. So again, lot of potential variability, but even in the worst case scenario, we are talking about a very sizeable reduction in the odds. If we put these estimates head to head, we see that the estimates as we've seen before agree in terms of the direction of association. All agree that the group of children born to mothers who got AZT had lower risk of transmission than the control group. Now, if we look at the respective confidence intervals, they all agree in terms of statistical significance. None of them include their respective null values. Again, we would expect that consistency regardless of how we quantified our association using all three based on the same data. So, let's look at one more example just to talk about this hormone replacement therapy trial that was stopped because of the increased risk of heart disease in women who were given hormone replacement compared to those who weren't. Let's look at what the results were in terms of confidence intervals. Here's a two-by-two table of the results that we could use to estimate standard errors for our log ratios of interest. But I'll just cut to the chase and look at the numbers we're dealing with. We have already seen that the risk difference was 0.004 with the 95 percent confidence interval from 0.016 to 0.008. So, it was statistically significant even though the risk difference possibilities were small numerically. On the relative risk and odds ratio scales, both of the estimates showed an increase risk as well of heart disease in women who were given hormone replacement therapy compared to not and the confidence intervals were wide neither includes the null value of one as well. So, all three results show statistically significant increases in heart disease risk among those who were given hormone replacement therapy versus not. But on the lower end, and especially we can see it in the ratio scales, we're talking about anywhere from a one percent increase to 60 percent in terms of the relative risk, and one percent increase to 62 percent in terms of the odds. So, this caused a little bit of controversy because even though all results were statistically significant, some people were arguing that on the one hand on the lower end, the results were not scientifically large enough to justify not treating women who would get an increase in their quality of life if they were given hormone replacement therapy. So, in some cases even when the results are statistically significant, there's still not a consensus over the scientific conclusion. So, in general, confidence intervals for ratio-based measure of association with binary outcomes, both the relative risk and odds ratio need to be computed on the natural log scale and then the results exponentiated or anti-logged back to the ratio scale. The computations on the log scale they were business as usual, we take our estimated log of our ratio. So, the log of our estimated ratio and add or subtract two estimated standard errors and the standard errors will certainly be computed by the computer in general, but they're relatively easy to compute when setting up the data in a two-by-two format. The resulting estimates of the difference in proportions relative risk and odds ratios based on the same data will all agree in terms of the direction of association and the resulting confidence intervals will all agree with the inclusion or exclusion of the null value. The value meaning no difference or no association.