BookmarkSubscribeRSS Feed
knargis160
Calcite | Level 5

Hi!

I want to test the normality of data within a group rather than comparing groups-what is difference in class and by statements.

Can we use where statement to test normality within one group?

proc univariate data= mon6 normaltest;
var cohesion;
histogram / normal;
qqplot cohesion/normal(mu=est sigma =est) square;
class condition;
run;

 

1 REPLY 1
Reeza
Super User
If you use BY statements each group is treated independently it’s just repeated for each BY group.
CLASS is similar but doesn’t require the data to be presorted and will also do subgroups at the same time, if you have multiple variables defining your BY groups.

Yes, you can also use WHERE to filter your data set to a single group at a time. The results of the test is the same regardless of approach.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 353 views
  • 0 likes
  • 2 in conversation