Q: 1
SIMULATION
Scenario:
This project will use data setcert.input04. At any time, you may save your program
asprogram04incert\programs. Write a SAS program that will create the data setresults.output04.
In this program, complete the following mathematical actions, in the following order:
Round VAR1 and VAR2 to the nearest integer values.
Multiply the rounded VAR1b y the rounded VAR2 and assign the new value to VAR3.
Add VAR12 through VAR19 (8 variables) together, ignoring missing values. Assign the sum to VAR20.
For observation 16, what is the value ofVAR3? Enter your numeric answer in the space below:
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 2
SIMULATION
Scenario:
This project will use data setcert.input36. At any time, you may save your program asprogram36 in
cert\programs. Write a SAS program that will clean the data incert.input36as follows:
Step 1:
create a temporary data set, cleandata36.
In this data set, convert all case.
Then keep only observations with group equal to 'A' or 'B'.
Step 2:
Determine the MEDIAN value for the Kilograms variable for each group(A,B) in the cleandata36
data set. Round MEDIAN to the nearest whole number.
Step 3:
Create results.output36 from cleandata36
Ensure that all values for variable Kilogramsare between 40 and 200, inclusively.
If the value is missing or out of range, replace the value with the MEDIAN Kilograms value for the
respectivegroup(A,B) calculated in step 2
What is the MEAN Kilograms value for group='A' in the results.output36 data set?
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 3
SIMULATION
Scenario:
This project will use data set cert.input12. At any time, you may
save your program as program12 in cert\programs.
cert.input12 contains a single observation with two variables:
o salary
o year
Write a SAS program that will:
o Create an output data set results.output12.
o Read cert.input12 as input.
o Increase the salary variable by 5.65% annually until it is
greater than $500,000.
o Increment the year variable by 1 with each annual
increase.
o Create an output data set results.output12 that has one
observation for each value of year. Each observation
should have a year and salary variable.
What is the maximum salary hat is less than $500,000? Enter your numeric answer in the space
below (Round your answer to the nearest integer)
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 4
SIMULATION
Scenario:
This project will use data setcert.input04. At any time, you may save your program
asprogram04incert\programs. Write a SAS program that will create the data setresults.output04.
In this program, complete the following mathematical actions, in the following order:
Round VAR1 and VAR2 to the nearest integer values.
Multiply the rounded VAR1b y the rounded VAR2 and assign the new value to VAR3.
Add VAR12 through VAR19 (8 variables) together, ignoring missing values. Assign the sum to VAR20.
For observation 16, what is the value ofVAR20? Enter your numeric answer in the space below.
Round your answer to the nearest whole number. Save your program
asprogram04.sasincert\programs before continuing with the next project
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 5
Which statement about SAS libraries is true? Select one:
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 6
SIMULATION
Scenario:
This project will use data set cert.input08a and cert.input08b. At
any time, you may save your program
as program08 in cert\programs.
Both data sets contain a common numeric variable named ID.
Write a program that will use a SAS DATA Step to:
o Combine data sets cert.input08a and cert.input08b by
matching values of the ID variable.
o Write only observations that are in both data sets to a
new data set named results.match08.
o Write all other non-matching observations from either
data set to a new data set named results.nomatch08.
o Exclude all variables that begin with
"ex" from results.nomatch08.
How many variables (columns) are in results.match08
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 7
Variable Name would have a format of $CHAR15. in the new data set Work. Both. The LENGTH
statement only gives the variable Name a predefined maximum length. The correct answer is:
$CHAR15 Given the SAS data set WORK.ONE:
X Y Z
- - --
1 A 27
1 A 33
1 B 45
2 A 52
2 B 69
3 B 70
4 A 82
4 C 91
The following SAS program is submitted:
data WORK.TWO;
set WORK.ONE;
by X Y;
if First.Y; run; proc print data=WORK.TWO noobs;
run;
Which report is produced?
Select one:
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 8
The SAS data set named WORK.SALARY contains 10 observations for each department, and is
currently ordered byDepartment
The following SAS program is submitted:
data WORK.TOTAL;
set WORK.SALARY(keep=Department MonthlyWageRate);
by Department;
if First.Department=1 then Payroll=0;
Payroll+(MonthlyWageRate*12);
if Last.Department=1; run;
Which statement is true? Select one:
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 9
SIMULATION
Scenario:
This project will use data set cert.input12. At any time, you may
save your program as program12 in cert\programs.
cert.input12 contains a single observation with two variables:
o salary
o year
Write a SAS program that will:
o Create an output data set results.output12.
o Read cert.input12 as input.
o Increase the salary variable by 5.65% annually until it is
greater than $500,000.
o Increment the year variable by 1 with each annual
increase.
o Create an output data set results.output12 that has one
observation for each value of year. Each observation
should have a year and salary variable.
What is the value of year when the above salary occurs? Enter your numeric answer in the space
below.
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 10
The following SAS program is submitted:
proc means data=work.schools median;
run;
Assume thatWork.Schoolshas two numeric variables and the following PROC MEANS report is
produced:
Which of the following SAS statements completes the program and creates the desired report? Select
one:
Which of the following SAS statements completes the program and creates the desired report? Select
one:Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Question 1 of 20 · Page 1 / 2