O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13: Transforming Data with SAS Functions

  1. Which function calculates the average of the variables Var1, Var2, Var3, and Var4?
    1. mean(var1,var4)
      
    2.  mean(var1-var4)
      
    3. mean(of var1,var4)
      
    4. mean(of var1-var4)
      
    Correct answer: d
    Use a variable list to specify a range of variables as the function argument. When specifying a variable list, be sure to precede the list with the word OF. If you omit the word OF, the function argument might not be interpreted as expected.
  2. Within the data set Hrd.Temp, PayRate is a character variable and Hours is a numeric variable. What happens when the following program is run?
    data work.temp; 
       set hrd.temp; 
       Salary=payrate*hours; 
    run;
    
    1. SAS converts the values of PayRate to numeric ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required