- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
I can't understand the option b and don't know how to write the code for option d.
code I tried is below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
"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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.