Hi Team, I am practicing for the SAS base certification I have a scenario question which share by friend, I start to write the program for that I can't understand some points in the question. could please help to understand that.
Your code does not do
convert 777 in variables Score1,2,3 to missing (periods) using if… then … else statement
Instead it does things the other way around, it converts missing to 777.
Is Now my code is correct ?
proc import datafile="/home/u62129231/EPG1V2/SAS P 1/score_data_miss777.xlsx"
dbms=xlsx out=scoredata0 replace;
run;
data scoredata1;
set work.scoredata0;
if score1=777 then
do;
score1=.;
end;
if score2=777 then
do;
score2=.;
end;
if score3=777 then
do;
score3=.;
end;
run;
proc means data=scoredata1;
run;
proc print data=scoredata1;
run;
Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?
@Navaneethan6 wrote:
Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?
I don't understand your question.
@Navaneethan6 wrote:
Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?
Answer this question. When assigning letter grades do you use the class's average score? Or do you use the average score for an individual student in the class?
"c. calculate average of scores using SAS function MEAN"
>> you need to use the mean-function inside the data step, not the mean procedure
"d. using the calculated average score to create Grade categories A, B, C, D, F"
>> hardly possible without knowing which score to map to which letter. With the information a format or if-then-else could be used or a select-block.
I think that they want you to do 2a to 2d in a single data step.
Also did they provide a rule for converting an average score into a letter grade? What scores should considered an A? etc.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.