BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shea_poaa
Calcite | Level 5

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:

TypeCategoryMeanCI_LBCI_UB
1A50.90%49.48%52.32%
1B52.25%50.94%53.56%
1C58.62%57.47%59.77%
1D45.73%44.61%46.85%
1E55.13%54.04%56.22%
1F59.43%58.33%60.53%
2A54.82%52.24%57.40%
2B61.85%59.43%64.26%
2C66.23%63.91%68.54%
2D51.53%49.23%53.84%
2E57.74%55.36%60.11%
2F61.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:

 

image.png

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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."

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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."

shea_poaa
Calcite | Level 5
Those plots are great! I'll give them a shot. Thanks for your help and putting a name to the concept.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1437 views
  • 1 like
  • 2 in conversation