Like the difference in proportions, relative risk is just an estimate when working with a sample. As Agresti states on page 22, “using the difference of proportions alone to compare two groups can be somewhat misleading when the proportions are both close to zero.” So while the difference in proportions was slight (only about 0.008), the relative risk tells a different story. The result of 1.82 can be interpreted as “the proportion of MI cases for physicians taking placebo was about 1.82 times the proportion of MI cases for physicians taking aspirin.” Or stated another way, the sample proportion of MI cases was about 82% higher for the placebo group.
![make ci for difference in proportion on minitab express make ci for difference in proportion on minitab express](https://media.cheggcdn.com/study/fcb/fcb89b92-d273-460a-8fa0-6a64dc5fe4fc/image.png)
In the next line we take the proportion of “Placebo/Yes” (row 1, column 1) and divide it by the proportion of “Aspirin/Yes” (row 2, column 1). In the first line we save the result into an object called prop.out. We can calculate the relative risk in R “by hand” doing something like this: Relative risk is usually defined as the ratio of two “success” proportions. To investigate this we turn to relative risk and odds ratios. Standard errors, and hence p-values, are functions of sample size, so really large samples almost always lead to confidence intervals that don’t overlap 0.īut a difference between two proportions near 0 or 1 may be more noteworthy than a difference between two proportions that fall closer to the middle of the range. We may be tempted to dismiss this difference as not practical and just an artifact of our large sample size. Now the difference is small (less than 1%) and the sample is pretty big. We then accessed the “estimate” element of the object, which contained both estimated proportions, and calculated the difference. The prop.test function will then calculate the proportion of “Yes” in the Placebo group and Aspirin group, respectively, test if they’re equal or not, and output a confidence interval for the difference in the two proportions.Ībove we saved the output of prop.test into an object called “p.out”. If we think of “Yes” as success and “No” as failure, that’s exactly what we have with our MI matrix. If we read the documentation for prop.test it says it requires “a two-dimensional table (or matrix) with 2 columns, giving the counts of successes and failures, respectively.”
![make ci for difference in proportion on minitab express make ci for difference in proportion on minitab express](https://i.ytimg.com/vi/MnMTJvl6tCo/maxresdefault.jpg)
In addition it will provide a confidence interval for the difference in proportions. If we give it a 2 x 2 table, it will test the null hypothesis that the proportions in both groups are the same. The easiest way is to use the prop.test function. To see the details of this we refer you to most any introductory statistics book or Google. Then we can use that standard error to form a confidence interval.
![make ci for difference in proportion on minitab express make ci for difference in proportion on minitab express](https://i.ytimg.com/vi/_S6CZ0KxkmY/maxresdefault.jpg)
So we need to calculate a standard error for the difference in proportions to give us some indication of its variability. If we were take another sample and calculate the difference in proportions we would get a different estimate. Of course if our data is a sample, the calculated difference in proportions is just an estimate.
MAKE CI FOR DIFFERENCE IN PROPORTION ON MINITAB EXPRESS HOW TO
We’ll cover much of what is presented in pages 20 – 25 of Agresti, but we’ll provide R code to show how to carry out the calculations.Ī common approach to comparing proportions is to subtract one from the other and look at the difference.
![make ci for difference in proportion on minitab express make ci for difference in proportion on minitab express](https://support.minitab.com/en-us/minitab-express/1/two_t_hospital_comparison.xml_Graph_cmd2o6.png)
Let’s now work with this table and explore how we can compare these proportions. The Placebo group was about 2% while the Aspirin group was about 1%. We see that the proportion of MI (“Yes”) for both groups are not only small, but pretty close together. We specify “margin = 1” so the proportions are calculated row-wise.