Answer:
Base SAS is the foundation of the SAS programming language, providing data management, analysis, and reporting capabilities.
Answer:
The main data types in SAS are numeric, character, and date/time.
Answer:
A new variable can be created using the DATA step and the SET or INPUT statements.
Answer:
The WHERE statement is used for subsetting observations, while the IF statement is used for conditional processing within a DATA step.
Answer:
Missing values can be handled using the MISSING function, the IF-THEN statement, or the COALESCE function.
Answer:
SAS formats are used to control the appearance of data values, while informats are used to read data values into SAS variables.
Answer:
Both procedures calculate summary statistics, but PROC MEANS provides additional features like handling missing values and producing percentile statistics.
Answer:
Data can be sorted using the SORT procedure or by using the SORT statement within a DATA step.
Answer:
The RETAIN statement is used to retain the value of a variable across iterations of the DATA step.
Answer:
Datasets can be merged using the MERGE statement or the SQL JOIN operation.
Answer:
The LENGTH statement is used to assign the length of a variable in SAS.
Answer:
SAS programs can be debugged using various techniques such as the PUT statement, the DEBUG option, and the SAS log.
Answer:
SAS macro variables are created and manipulated using the %LET statement and are used to store and retrieve values during macro processing.
Answer:
A macro variable can be created using the %LET statement or by assigning a value using a DATA step or a PROC SQL statement.
Answer:
The ODS (Output Delivery System) statement is used to control the output destination and format of SAS output.
Answer:
A SAS dataset is a physical file stored on disk, while a SAS view is a virtual dataset that is defined by a SAS program and does not store data itself.
Answer:
Duplicate observations can be identified and handled using the SORT procedure with the nodupkey or nodup option.
Answer:
The BY statement is used to group data and perform calculations within each group using procedures like PROC SORT and PROC MEANS.
Answer:
SAS functions include numeric, character, date/time, and conversion functions, among others.
Answer:
A permanent SAS dataset can be created using the DATA step and the LIBNAME statement to assign a permanent library.
Answer:
Data can be imported from an external file into SAS using the INFILE statement or the IMPORT procedure.
Answer:
A SAS data library is a collection of one or more SAS datasets that are stored together under a common name or location.
Answer:
Data can be exported from SAS to an external file using the FILE statement or the EXPORT procedure.
Answer:
PROC SQL provides a SQL interface within SAS and allows you to manipulate and query data using SQL syntax.
Answer:
Random numbers can be generated in SAS using the RAND function or by using the RANUNI or RANNOR functions for uniform or normal distributions, respectively.