Preparing Data
Graded Quiz • 30 min Quiz10 Questions Week 4
Re⥃askly Logo

Preparing Data

Graded Quiz • 30 min Quiz10 Questions Week 4
Practice More Quizzes:
Quiz
10 Questions Week 6
Quiz
10 Questions Week 6
Quiz
10 Questions Week 5
Quiz
9 Questions Week 1
Quiz
10 Questions Week 2
Quiz
10 Questions Week 3
Quiz
10 Questions Week 4

Q:

The DATA step checks for syntax errors in the compilation phase.

Q:

In which phase does the DATA step check for syntax errors?

Q:

Which of the following statements is incorrect about the compilation phase during DATA step processing?

Q:

Which statement is used to read a SAS data set in a DATA step?

Q:

Which of the following is true about the SET statement in a DATA step?

Q:

Which statement is used to create or update a SAS table in a DATA step?

Q:

To process a CSV file with the DATA step, you must first create a copy of the data as a SAS table.

Q:

You can read data directly from an Excel worksheet by using the XLSX LIBNAME engine.

Q:

To process an Excel file with the DATA step, you must first create a copy of the data as a SAS table.

Q:

What is the name of the input data set in the program below? data work.au; set data.sales; where Country=’AU’;run;

Q:

What is the name of the output data set in the program below? data work.us; set orion.sales; where Country=’US’; run;

Q:

Which statement in the program below creates the output table?

Q:

The data set orion.sales contains nine columns. Given this DATA step, how many columns does work.comp have? data work.comp; set orion.sales; keep employee_id status job_title salary; run;

Q:

The data set data.stock contains sixteen columns. Given the DATA step, how many columns does work.carsales have? data work.carsales; set data.stock; drop make model midsize_gas midsize_electric economy;run;

Q:

The data set american.stock contains 12 columns and you want 10 of those columns included in the output table. Which statement would be most appropriate?

Q:

Given the assignment statement below, which of the following is true regarding the value of AvgExp for the observation that is shown? AvgExp=mean(Exp1, Exp2, Exp3, Exp4); Exp1 Exp2 Exp3 Exp4 2 7 3 .

Q:

Given the assignment statement below, what is the value of AvgExp for the observation that is shown? AvgExp=mean(Exp1, Exp2, Exp3, Exp4); Exp1 Exp2 Exp3 Exp4 8 3 7 .  

Q:

Given the assignment statement below, what is the value of AvgExp for the observation that is shown? AvgExp=mean(Exp1, Exp2, Exp3, Exp4); Exp1 Exp2 Exp3 Exp4 10 . 5 9

Q:

Which of the following SAS functions returns a number from 1 to 4?

Q:

Which of the following SAS functions returns a number from 1 to 12?

Q:

Which of the following SAS functions returns a number from 1 to 31?

Q:

In the program below, what is the value of Credit if Country is ‘au’? data work.bonus; set orion.sales; if Country=’US’ then Credit=300; else if Country=’AU’ then Credit=500; else Credit=0; run;

Q:

The first IF condition is true. Therefore, SAS assigns the value 265 to Credit and skips the rest of the conditional processing statements. data work.payment; set orion.sales; if Country=’US’ then Credit=265; else if Country=’AU’ then Credit=377; else Credit=0;run;

Q:

In the program below, what is the value of Credit if Country is ‘DK’ ? data work.payment; set orion.sales; if Country=’US’ then Credit=265; else if Country=’AU’ then Credit=377; else if Country=’EG’ then Credit=400 else Credit=100;run;

Q:

What is the length of the Position column created in this program? data position_salary; set orion.salaries; if salary>70000 then position=”Manager”; else position=”Employee”; length position $ 9;run;

Q:

What is the length of the Position column created in this program? data position_salary; set orion.salaries; length position $ 11; if salary>65000 then position=”Engineer2″; else if salary>52000 then position=”Engineer”; else if salary>50000 then position=”Technician2″; else position=”Technician”;run;

Q:

What is the length of the Car_Type column created in this program? data car_type; set sashelp.cars; if msrp>80000 then car_type=”luxury”; else car_type=”regular”; length car_type $ 8;run;

Q:

Use a DO group in a DATA step when you want to execute multiple statements for a true IF-THEN expression.

Q:

Use a DO group in a PROC step when you want to execute multiple statements for a true IF-THEN expression.

Q:

Use an AND operator in a DATA step when you want to execute multiple statements for a true IF-THEN expression.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Find Questions in This Page: "CTRL+F"