BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
xliu1
Quartz | Level 8

I am taking the practice exam for base programming, and was confused about the difference between the project requirements and answer key. Here is the description of the projects. It clearly says to subset the data using the variable kilograms between 40 and 200, inclusively.  However, the answer code is kilograms <40 or kilograms >200  (please see the screenshots below). The results from PROC MEANS analysis are slightly different from what I manually calculated from the raw data, which for group A is 76.02 and group B is 86.25. Thanks in advance!

 

xliu1_2-1696893550507.png

 

xliu1_0-1696893305985.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mark2010
SAS Employee

It isn't actually subsetting the data. It is replacing out of range values. The extra piece of information is the in the bullet following the one highlighted. It is preserving the values inclusively between 40 and 200 and only executing the DO group to replace the values if they are outside this range.

View solution in original post

3 REPLIES 3
Tom
Super User Tom
Super User

The code in your picture actually is separating into two groups based on a range from 40 to 200 inclusive.   

The test (40 <= A and A <= 200) is the same as NOT (A<40 or A>200).

 

Mark2010
SAS Employee

It isn't actually subsetting the data. It is replacing out of range values. The extra piece of information is the in the bullet following the one highlighted. It is preserving the values inclusively between 40 and 200 and only executing the DO group to replace the values if they are outside this range.

xliu1
Quartz | Level 8

Thank you for clarify this. 

Welcome to the Certification Community

 

This is a knowledge-sharing community for SAS Certified Professionals and anyone who wants to learn more about becoming SAS Certified. Ask questions and get answers fast. Share with others who are interested in certification and who are studying for certifications.To get the most from your community experience, use these getting-started resources:

Community Do's and Don'ts
How to add SAS syntax to your post
How to get fast, helpful answers
3 ways to show off your SAS skills

 

Why Get SAS Certified.jpg

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
  • 1717 views
  • 3 likes
  • 3 in conversation