Chapter Review Quiz SAS


Creating Summary Reports

Select the best answer for each question. When you are finished, click Submit Quiz.

  1. Which of these procedures produces output that is most useful for detecting duplicate values?

     a.   PROC PRINT
     b.   PROC FREQ
     c.   PROC MEANS
     d.   PROC UNIVARIATE


  2. Which of these programs is most useful for determining the exact observation that contains a numeric variable with an extreme value?

     a.  
    proc print data=sales.totals;
       var ProdNum Sales Region; 
    run;
     b.  
    proc freq data=sales.totals; 
       tables ProdNum Sales Region; 
    run;
     c.  
    proc univariate data=sales.totals;
    run;


  3. A PROC FREQ analysis identified invalid and missing values in a data set. Which of these procedures will display the observations that contain invalid or missing values?

     a.   PROC PRINT
     b.   PROC FREQ
     c.   PROC MEANS
     d.   PROC UNIVARIATE


  4. Which PROC FREQ step creates the output shown here?

    Number of Variable Levels
    Variable
    Label
    Levels
    Order_Type
    Order Type
    3

    Order Type
    Order _Type
    Frequency
    Percent
    1
    13
    59.09
    2
    2
    9.09
    3
    7
    31.82

     a.  
    proc freq data=orion.qtr1_2007;
       tables Order_Type;
    run;
     b.  
    proc freq data=orion.qtr1_2007 nlevels;
       tables Order_Type/nocum;
    run;
     c.  
    proc freq data=orion.qtr1_2007 nlevels;
       tables Order_Type/noprint;
    run;
     d.  
    proc freq data=orion.qtr1_2007 nlevels;
       tables Order_Type nocum;
    run;


  5. This PROC MEANS step creates all of the statistics listed below.

    proc means data=orion.sales;
    run;
    • minimum and maximum
    • the total number of observations that PROC MEANS processes for each subgroup (N Obs)
    • mean and standard deviation
    • the number of nonmissing values (N)

     a.   True
     b.   False


  6. What must be added to this PROC MEANS statement to produce this output?

    proc means data=orion.customer_dim ________________;
       var Customer_Age;
       class Customer_Gender;
       where Customer_Country ne 'US';
    run;

                      The MEANS Procedure
    Analysis Variable: Customer_Age
    Customer_Age
    Customer
    Gender
    Range
    Mean
    F
    54.0
    35.1
    M
    54.0
    47.0

     a.  
    nonobs
     b.  
    range mean
     c.  
    range mean nonobs bestw.
     d.  
    range mean nonobs maxdec=1


  7. Which option lets you specify the number of extreme observations displayed by PROC UNIVARIATE?

     a.   NEXTROBS=
     b.   NLEVELS
     c.   NOPRINT
     d.   _ALL_


  8. Which destination creates a file that keeps the style information and opens in multiple worksheets in an Excel workbook?

     a.   CSVALL
     b.   EXCELXP
     c.   MSOFFICE2K
     d.   none of the above


  9. Which statement about style definitions is true?

     a.   The STYLE= option affects the display in all destinations.
     b.   You can use the STYLE= option in an ODS statement or in a PROC statement.
     c.   A style definition specifies colors, fonts, and a file format for an external file.
     d.   If you do not specify a style definition, SAS uses a default style definition that varies by the destination.


  10. Suppose you submit the program shown below. What happens if you then submit a simple PROC PRINT step?

    ods _all_ close;
    ods csvall file='c:\ctry.csv';
    
    proc freq data=orion.sales;
       tables Country;
    run;
    
    ods csvall close;
     a.   The PROC PRINT output is displayed in the default window.
     b.   The PROC PRINT output is not displayed and a warning is written to the log indicating that there are no active destinations.
     c.   The PROC PRINT output is appended to the PROC FREQ output in the file ctry.csv.




Copyright © 2011 SAS Institute Inc., Cary, NC, USA. All rights reserved.