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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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