BookmarkSubscribeRSS Feed
SAS93
Quartz | Level 8

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. 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Please show us the code that created these confidence intervals.

--
Paige Miller
ballardw
Super User

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.

Rick_SAS
SAS Super FREQ

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1064 views
  • 1 like
  • 4 in conversation