Currently, I have several confidence intervals across categorical variables under several broader categories. Here's a simplified version of the data to better explain the situation:
Suppose my data set is work.ci_out:
Type | Category | Mean | CI_LB | CI_UB |
1 | A | 50.90% | 49.48% | 52.32% |
1 | B | 52.25% | 50.94% | 53.56% |
1 | C | 58.62% | 57.47% | 59.77% |
1 | D | 45.73% | 44.61% | 46.85% |
1 | E | 55.13% | 54.04% | 56.22% |
1 | F | 59.43% | 58.33% | 60.53% |
2 | A | 54.82% | 52.24% | 57.40% |
2 | B | 61.85% | 59.43% | 64.26% |
2 | C | 66.23% | 63.91% | 68.54% |
2 | D | 51.53% | 49.23% | 53.84% |
2 | E | 57.74% | 55.36% | 60.11% |
2 | F | 61.14% | 58.72% | 63.56% |
What I would like to do is to create a table/matrix output that compares the CI upper bounds against the CI lower bounds and flags any pairings (under a Type) where the upper bound is less than the lower bound, i.e., where there is a significant difference. The output would look something like this:
Not sure if this type of an output already has a name. Either way, these matrices flag the category pairs where the CI Upper Bound is less than the CI Lower Bound. Obviously, the diagonals would always be empty, but with this table, we can quickly see which categories are significantly smaller than others.
The other subtle thing I would like to be able to do is to have separate matrices for different Types, as pictured above.
The confidence interval data is currently sitting in a SAS data set that looks a lot like the first table. A colleague suggested I use arrays to do this, but I have been struggling mightily with this since I am not the most proficient at SAS. Any help would be greatly appreciated.
Thanks!
The name you are searching for is "multiple comparisons of means." The GLM procedure can do it. There are examples in the doc. I suggest using a Tukey-Kramer adjustment and visualizing the differences in means by using the 'diffogram', as explained in the article "The diffogram and other graphs for multiple comparisons of means."
The name you are searching for is "multiple comparisons of means." The GLM procedure can do it. There are examples in the doc. I suggest using a Tukey-Kramer adjustment and visualizing the differences in means by using the 'diffogram', as explained in the article "The diffogram and other graphs for multiple comparisons of means."
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.