SAS Certification Guide - Part II

This post is meant to help you understand the basics of SAS.

To see Part I study material, click on SAS Certification Guide - Part I .

6. How to print observations 5 through 10 from a data set?

The FIRSTOBS= and OBS= data set options would tell SAS to print observations 5 through 10 from the data set READIN.

7. What happens if no VAR statement is used in PROC PRINT?

- SAS would print observations using all of the variables in the order the variables appear in the dataset.

8. What is the purpose of the single trailing @ sign?

@, a single trailing @, holds an input record for the execution of the next INPUT statement within the same iteration of the DATA step. Thus, the next INPUT statement reads from the same record (line)

9. Difference between FUNCTION and PROC

Example : MEAN function and PROC MEANS

MEAN function returns an average across an observation (a row) while the PROC MEANS returns an average across many observations (a column)

MEAN Function

The output is shown below :


The output is shown below :

10. Differences between WHERE and IF statement?

  1. WHERE statement can be used in procedures to subset data while IF statement cannot be used in procedures.
  2. WHERE can be used as a data set option while IF cannot be used as a data set option.
  3. WHERE statement is more efficient than IF statement. It tells SAS not to read all observations from the data set
  4. WHERE statement can be used to search for all similar character values that sound alike while IF statement cannot be used.
  5. WHERE statement can not be used when reading data using INPUT statement whereas IF statement can be used.
  6. Multiple IF statements can be used to execute multiple conditional statements 
  7. When it is required to use newly created variables, use IF statement as it doesn't require variables to exist in the READIN data set
For detailed explanation, click on this link - SAS : Where Vs IF .

SAS Tutorials : 100 Free SAS Tutorials

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*

Related Posts:

0 Response to "SAS Certification Guide - Part II"

Post a Comment

Next → ← Prev