SAS P1 L4a Flashcards

1
Q

How display specific info from data set?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

PROC PRINT - default display?

A

PROC PRINT: by default
displays ALL variables / obs in data set
variables appear in order they occur in data set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

VAR statement does what?

Syntax?

A

VAR statement: modifies PROC PRINT,
allows to display only variables you want

PROC PRINT data=data_set;
VAR Variable_One Variable_Two etc;
RUN;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SUM statement does what?

Syntax?

A

SUM statement: calculates and displays column totals for requested variable. Will appear at end of report.

SUM Variable_One;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

WHERE statement:
used for?
output contains?
syntax?

A

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;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an expression?

A

Expression: sequence of operands, operators that form set of instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are operands?

A

Operands:

  • character constants - need quotes, case specific
  • numeric constants - don’t need quotes or special char
  • date constants
  • character variables
  • numeric variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which variables can be used?

A

Must be variable from input data set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Operators to use with WHERE?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly