Base SAS Flashcards
What is the basic structure of the SAS base program?
DATA step, which recovers & manipulates data.
PROC step, which interprets the data.
What is the basic syntax style in SAS?
- There should be a semi-colon at the end of every line
- A data statement that defines your data set
- Input statement
- There should be at least one space between each word or statement
- A run statement
Explain data step in SAS
The Data step creates a SAS dataset which carries the data along with a “data dictionary.” The data dictionary holds information about the variables and their properties.
What are the data types does SAS contain?
The data types in SAS are Numeric and Character.
Which statement does not perform automatic conversions in comparisons?
In SAS, the “where” statement does not perform automatic conversions in comparisons.
What is a method to debug and test your SAS program?
This combination of options tells SAS to execute the step and analyze the syntax of your code without reading any input data.
options OBS=0 NOREPLACE;
What is the difference between nodupkey and nodup options?
The difference between the NODUP and NODUPKEY is that NODUP compares all the variables in our dataset while NODUPKEY compares just the BY variables
What does PROC print, and PROC contents do?
To display the contents of the SAS dataset PROC print is used and also to assure that the data were read into SAS correctly. While PROC CONTENTS display information about a SAS dataset.
What is the use of function Proc summary?
The syntax of proc summary is the same as that of proc means. It computes descriptive statistics on numeric variables in the SAS dataset.
What Proc glm does?
Proc glm performs simple and multiple regression, analysis of variance (ANOVAL), analysis of covariance, multivariate analysis of variance and repeated measure analysis of variance.
What is SAS informats?
SAS INFORMATS are used to read, or input data from external files known as Flat Files ASCII files, text files or sequential files). The informat will tell SAS on how to read data into SAS variables.
Name types of category in which SAS Informats are placed
Character Informats : $INFORMATw
Numeric Informats : INFORMAT w.d
Date/Time Informats: INFORMAT w.
What is the use of PROC gplot?
PROC gplot has more options and can create more colorful and fancier graphics.
What is the difference between INPUT and INFILE ?
INFILE statement is used to identify an external file
INPUT statement is used to describe your variables
State the difference between INFORMAT and FORMAT ?
INFORMAT: To indicate SAS how to read data into a dataset.
FORMAT: To indicate SAS how to print the variables