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: Call for Content

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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