BookmarkSubscribeRSS Feed
IV
Calcite | Level 5 IV
Calcite | Level 5
Hi guys

I need some help with a question coming from SAS base exam.

The following SAS program is submitted:

data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department then payroll = 0;
payroll + wagerate;
if last.department;
run;


Question:
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments. Which one of the following represents how many observations the WORK.TOTAL data set contains?


From what i seen the answer is 5.

But i really need some explaination on this.

thanks in advance

IV
2 REPLIES 2
Ksharp
Super User
Yes .it is five.
because
if last.department; means if last.department then output; So only five obs be output.

Ksharp
IV
Calcite | Level 5 IV
Calcite | Level 5
hi thanks very much

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1051 views
  • 0 likes
  • 2 in conversation