I want to find a way to flag or otherwise ID the ranges of 95% CLs for a series of datasets I have.
Obs | FPL | RowPercent | RowLowerCL | RowUpperCL |
---|---|---|---|---|
1 | 1 | 67.4 | 63.5 | 71.4 |
2 | 2 | 68.0 | 62.5 | 73.6 |
3 | 3 | 63.8 | 56.2 | 71.4 |
4 | 4 | 51.1 | 42.0 | 60.3 |
These datasets are outputs from previous crosstabulations. I run Chi-square tests for these crosstabulations as well, but I want a visual way to ID and get a sense of which CLs overlap with all the others (not just compare FPL=1-2, 2-3, etc.).
I've come across various approaches to ID consecutive data ranges that overlap, largely with first./last. and retain statements, but they don't work for my situation. I think a matrix might be best to concisely ID the unique pairs, but I'm not sure how to approach that.
Please show us the code that created these confidence intervals.
Something like this perhaps:
data have; input FPL RowPercent RowLowerCL RowUpperCL; datalines; 1 67.4 63.5 71.4 2 68.0 62.5 73.6 3 63.8 56.2 71.4 4 51.1 42.0 60.3 ; proc sgplot data=have; highlow x=fpl low=rowlowercl high=rowuppercl; xaxis type=discrete; run;
Note the use of data step code to provide example data. That way we can write code to use your example data.
If you are trying to see whether the means of different categories are significant;y different from each other, be sure to correct for multiple comparisons. Please see the visualizations that are created automatically by using PROC GLM, such as
Be aware that the overlapping of 95% CIs is neither necessary nor sufficient for inferring that the difference between the means is significant.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.