Base SAS Programming – Day 7

Introduction to Important PROCs – FREQ, SUMMARY and FUNCTIONS in SAS

  1. Proc Freq
    • To determine the frequency of occurrence of values in categorical variables
    • Results in frequency, cumulative frequency, percentage and cumulative percentage
    • Can create a n-way crosstab using tables statement and * between the variables
    • Crosstab results in frequency, percentage, row percent and column percent
    • norow, nocol, nocumm, nopercent options can be used with Tables statement to customise the result
  2. Proc Summary
    • Similar to proc Means, used to extract basic statistics / summarize data
    • Print or Output option MUST be used in Proc Summary to get the result
    • By and Class statements can be used in Proc Summary
  3. Functions in SAS
    • There are different types of functions in SAS, mainly used for data manipulation
    • Text functions, Data Type conversion functions, Math / Stat functions, Date and Time functions
    • Type conversion functions
      • Input – to convert character data type to numeric
      • Put – to convert numeric data type to character
    • Text functions
      • Substr – to extract part of a string, based on number of characters
      • Scan – to extract part of a string, based on a delimiter

Comments


One thought on “Base SAS Programming – Day 7

Leave a Reply

Your email address will not be published.