SAS P1 L4a Flashcards
How display specific info from data set?
To display specific info from data set,
add statements to PROC PRINT -
select variables, subset observations, sort and group objects, specify titles and footnotes, assign labels to variables
PROC PRINT - default display?
PROC PRINT: by default
displays ALL variables / obs in data set
variables appear in order they occur in data set
VAR statement does what?
Syntax?
VAR statement: modifies PROC PRINT,
allows to display only variables you want
PROC PRINT data=data_set;
VAR Variable_One Variable_Two etc;
RUN;
SUM statement does what?
Syntax?
SUM statement: calculates and displays column totals for requested variable. Will appear at end of report.
SUM Variable_One;
WHERE statement:
used for?
output contains?
syntax?
WHERE statement:
- used to subset observations
- output contains only obs that meet conditions in WHERE statement
- defines a condition for selecting observations
- can be any valid SAS expression
WHERE where-expression;
What is an expression?
Expression: sequence of operands, operators that form set of instructions
What are operands?
Operands:
- character constants - need quotes, case specific
- numeric constants - don’t need quotes or special char
- date constants
- character variables
- numeric variables
Which variables can be used?
Must be variable from input data set
Operators to use with WHERE?
Operators: can use
comparison: equal, greater than, less than
arithmetic: plus, minus, times, divide
logical: not, and, or
(spelled out because symbols won’t work on flashcard)