SAS Chapter 1 Basic Concepts

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 20,578
Questions: 10 | Attempts: 1,594

SettingsSettingsSettings
SAS Chapter 1 Basic Concepts - Quiz

Practice preparing for the SAS certification test.


Questions and Answers
  • 1. 

    How many observations and variables does the data set below contain?

    • A.

      3 observations, 4 variables

    • B.

      3 observations, 3 variables

    • C.

      4 observations, 3 variables

    • D.

      Can't tell because some values are missing

    Correct Answer
    C. 4 observations, 3 variables
    Explanation
    Rows in the data set are called observations, and columns are called variables. Missing values don't affect the structure of the data set.

    Rate this question:

  • 2. 

    How many steps are executed when the program below is processed? data user.tables;      infile jobs;      input date name $ job $; run; proc sort data=user.tables;      by name; run; proc print data=user.tables; run;

    • A.

      Three

    • B.

      Four

    • C.

      Five

    • D.

      Six

    Correct Answer
    A. Three
    Explanation
    When it encounters a DATA, PROC, or RUN statement, SAS stops reading statements and executes the previous step in the program. The program above contains one DATA step and two PROC steps, for a total of three program steps.

    Rate this question:

  • 3. 

    What type of variable is the variable AcctNum in the data set below?

    • A.

      Numeric

    • B.

      Character

    • C.

      Can be either character or numeric

    • D.

      Can't tell from the data shown

    Correct Answer
    B. Character
    Explanation
    It must be a character variable, because the values contain letters and underscores, which are not valid characters for numeric values.

    Rate this question:

  • 4. 

    What type of variable is the variable Wear in the data set below, assuming that there is a missing value in the data set?

    • A.

      Numeric

    • B.

      Character

    • C.

      Can be either character or numeric

    • D.

      Can't tell from the data shown

    Correct Answer
    A. Numeric
    Explanation
    It must be a numeric variable, because the missing value is indicated by a period rather than a blank.

    Rate this question:

  • 5. 

    Which of the following variable names is valid?

    • A.

      4BirthDate

    • B.

      $Cost

    • C.

      _Items_

    • D.

      Tax-Rate

    Correct Answer
    C. _Items_
    Explanation
    Variable names follow the same rules as SAS data set names. They can be 1 to 32 characters long, must begin with a letter(A-Z, either uppercase or lowercase) or an underscore, and can continue with any combination of numbers, letters, or underscores.

    Rate this question:

  • 6. 

    Which of the following files is a permanent SAS file?

    • A.

      Sashelp.PrdSale

    • B.

      Sasuser.MySales

    • C.

      Profits.Quarter1

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    To store a file permanently in a SAS data library, you assign it a libref other than the default Work. For example, by assigning the libref Profits to a SAS data library, you specify that files within the library are to be stored until you delete them. Therefore, SAS files in the Sashelp and Sasuser libraries are permanent files.

    Rate this question:

  • 7. 

    In a DATA step, how can you reference a temporary SAS data set named Forecast?

    • A.

      Forecast

    • B.

      Work.Forecast

    • C.

      Sales.Forecast

    • D.

      Only a and b above

    Correct Answer
    D. Only a and b above
    Explanation
    To reference a temporary SAS file in a DATA step or PROC step, you can specify the one-level name of the file (for example, Forecast) or the two-level name using the libref Work (for example, Work.Forecast).

    Rate this question:

  • 8. 

    What is the default length for the numeric variable Balance?

    • A.

      5

    • B.

      6

    • C.

      7

    • D.

      8

    Correct Answer
    D. 8
    Explanation
    The numeric variable Balance has a default length of 8. Numeric values (no matter how many digits they contain) are stored in 8 bytes of storage unless you specify a different length.

    Rate this question:

  • 9. 

    How many statements does the following SAS program contain? proc print data=new.prodsale           label double;      var state day price1 price2; where state='NC';      label state='Name of State'; run;

    • A.

      Three

    • B.

      Four

    • C.

      Five

    • D.

      Six

    Correct Answer
    C. Five
    Explanation
    The five statements are: 1) the PROC PRINT statement (two lines long); 2) the VAR statement; 3) the WHERE statement (on the same line as the VAR statement); 4) the LABEL statement; and 5) the RUN statement (on the same line as the LABEL statement).

    Rate this question:

  • 10. 

    What is a SAS library?

    • A.

      Collection of SAS files, such as SAS data sets and catalogs

    • B.

      In some operating environments, a physical collection of SAS files

    • C.

      In some operating environments, a logically related collection of SAS fils

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    Every SAS file is stored in a SAS library, which is a collection of SAS files, such as SAS data sets and catalogs. In some operating environments, a SAS library is a physical collection of files. In others, the files are only logically related. In the Windows and UNIX environments, a SAS library is typically a group of SAS files in the same folder or directory.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 09, 2013
    Quiz Created by
    Moxleyv

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.