Ans: SAS means Statistical Analysis System, which is an integrated set of software products.
Ans: The basic structure of SAS are
Ans: To run program successfully, and you have following basic elements:
For example: Infile ‘H: \StatHW\yourfilename.dat’;
Ans: The Data step creates an SAS dataset which carries the data along with a “data dictionary.” The data dictionary holds the information about the variables and their properties.
Ans: The logical area in the memory is represented by PDV or Program Data Vector. At the time, SAS creates a database of one observation at a time. An input buffer is created at the time of compilation which holds a record from an external file. The PDV is created following the input buffer creation
Ans: The data types in SAS are Numeric and Character.
Ans: In SAS, the “where” statement does not perform automatic conversions in comparisons.
Ans: You can debug and test your SAS program by using Obs=0 and systems options to trace the program execution in log
Ans: The difference between the NODUP and NODUPKEY is that, NODUP compares all the variables in our dataset while NODUPKEY compares just the BY variables
Ans: For DataSet : Data set name/ debug Data set: Name/stmtchk
For Macros: Options: mprint mlogic symbolgen
Ans: 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 an SAS dataset.
Ans: The syntax of proc summary is same as that of proc means, it computes descriptive statistics on numeric variables in the SAS dataset.
Ans: Proc glm performs simple and multiple regression, analysis of variance (ANOVAL), analysis of covariance, multivariate analysis of variance and repeated measure analysis of variance.
Ans: 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.
Ans: SAS informats are placed in three categories,
Ans: syntax concatenate character strings remove trailing and leading blanks and inserts separators.
Ans: PROC gplot has more options and can create more colorful and fancier graphics.
Ans: In SAS, PROC steps analyze and process data in the form of an SAS data set. It controls a library of routines that perform tasks on SAS data set such as sorting, summarizing and listing.
INFILE | INPUT |
· INFILE statement is used to identify an external file | · INPUT statement is used to describe your variables |
Ans:Factor analysis is a common term used for a family of statistical techniques associated with the reduction of a set of observable variables in terms of a small number of latent factors. The main goal of factor analysis is data reduction and summarization.
Ans: You read the variables using input statement with column /line pointers, informats and length specifiers.
Ans: Special input delimiters used in SAS are DLM and DSD.
Ans: When you define DSD, SAS treats two consecutive delimiters as a missing value and removes quotation marks from character values.
Ans: The good SAS programming practices for processing large data sets is to sort them once using firstobs= and obs=.
Ans: To include or exclude specific variables in a data set you can use DROP, KEEP Statements and Data set Options.
Ans: The SUBSTR function is used to abstract substring from a character variable.
Ans: To check errors, use the Log and for data validation use things like Proc Freq, Proc Means or sometimes Proc print to see how data looks.
Ans: 5 ways to do a “table lookup” in SAS include,
Ans: You will generate test data with no input data using “put” statement and “Data Null”.
Ans: The “floor” returns the greatest integer less than/equal to the argument. Whereas the “ceil” function returns the smallest integer greater than/equal to the argument.
Ans: The difference between SAS functions and procedures is that
Ans: To remove duplicates using PROC SQL use following step,
Ans: Common programming errors committed in SAS are,
Ans: By using MAXDEC=option you can limit decimal places for the variable.
Ans:
Ans: A STOP statement is used to control the continuous looping in SET statement.
Ans: RUN-Group processing allows submitting a PROC step using RUN statement without ending the procedure.
For debugging in SAS use the Debug clause after ‘/’ in the data statement.
Ans: To create a permanent SAS data set, there are two steps necessary,
Ans: SLIBREF is a server-libref. It specifies the libref that is used by the server to identify the SAS data library when no physical name is determined and the server libref is different from the client libref.
Ans: The default statistics that PROC MEANS produce are,
Ans: The command used to find missing values is
missing_values=MISSING(field1,field2,field3);
Ans: A one-to-one merge is suitable if both data sets in the merge statement are sorted by id and each observation in one data set has a corresponding observation in the other data set. If the observations do not match, then match merging is suitable.
Ans: The scrubbing procedures in SAS are Proc Sort with nodupkey option. It will eliminate the duplicate values.
Ans: %INCLUDE statement reads an entire file into the current SAS program you are running and submits that file to the SAS System immediately.