Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in the appendix.
  1. Which SAS statement correctly uses column input to read the values in the raw data file below in this order: Address (fourth field), SquareFeet (second field), Style (first field), Bedrooms (third field)?
    Using Column Input to Read Raw Data
    1. input Address 15-29 SquareFeet 8-11 Style 1-6
            Bedrooms 13;
    2. input $ 15-29 Address 8-11 SquareFeet $ 1-6 Style 
            13 Bedrooms;
    3. input Address $ 15-29 SquareFeet 8-11 Style $ 1-6
            Bedrooms 13;
    4. input Address 15-29 $ SquareFeet 8-11 Style 1-6
            $ Bedrooms 13;
  2. Which is not an advantage of column input?
    1. It can be used to read character variables that contain embedded blanks.
    2. No placeholder is required for missing data.
    3. Standard as well as nonstandard data values can be read.
    4. Fields do not have to be separated by blanks or other delimiters.
  3. Which is an example of standard numeric data?
    1. -34.245
    2. $24,234.25
    3. 1/2
    4. 50%
  4. Formatted input can be used to read which of the following?
    1. standard free-format data
    2. standard data in fixed fields
    3. nonstandard data in fixed fields
    4. both standard and nonstandard data in fixed fields
  5. Which informat should you use to read the values in columns 1-5?
    Using Informats to Read Data
    1. w.
    2. $w.
    3. w.d
    4. COMMAw.d
  6. The COMMAw.d informat can be used to read which of the following values?
    1. 12,805
    2. $177.95
    3. 18%
    4. all of the above
  7. Which INPUT statement correctly reads the values for ModelNumber (first field) after the values for Item (second field)? Both Item and ModelNumber are character variables.
    Using an INPUT Statement to Read Character Data
    1. input +7 Item $9. @1 ModelNumber $5.;
    2. input +6 Item $9. @1 ModelNumber $5.;
    3. input @7 Item $9. +1 ModelNumber $5.;
    4. input @7 Item $9 @1 ModelNumber 5.;
  8. Which INPUT statement correctly reads the numeric values for Cost (third field)?
    Using an INPUT Statement to Read Numeric Data
    1. input @17 Cost 7.2;
    2. input @17 Cost 9.2.;
    3. input @17 Cost comma7.;
    4. input @17 Cost comma9.;
  9. Which SAS statement correctly uses formatted input to read the values in this order: Item (first field), UnitCost (second field), Quantity (third field)?
    Reading Data with Formatted Input
    1. input @1 Item $9. +1 UnitCost comma6.
            @18 Quantity 3.;
    2. input Item $9. @11 UnitCost comma6.
            @18 Quantity 3.;
    3. input Item $9. +1 UnitCost comma6.
            @18 Quantity 3.;
    4. all of the above
  10. Which raw data file requires the PAD option in the INFILE statement in order to correctly read the data using either column input or formatted input?
    1. Using the PAD Option in an INFILE Statement
    2. Using the PAD Option in an INFILE Statement
    3. Using the PAD Option in an INFILE Statement
    4. Using the PAD Option in an INFILE Statement
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.70.185