Module 8 Producing Descriptive Statistics Flashcards

1
Q

What is proc means?

A

Gets us basic statistics for numeric values

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

Proc means options

A

maxdec, max, min, mean, mode, N, NMISS, range, stdev, sum, etc

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

optional VARS statement

A

specified which numeric variables to use in the analysis

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

optional BY statement

A

performs a separate analysis for each level of variables in the list

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

what must we do before using BY?

A

SORT THE DATA!

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

optional CLASS statement

A

separate analysis for each level but no sorting needed

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

optional TYPES statement

A

specifies a combination of CLASS variables

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

optional TABLES statement

A

calculates frequencies, crosstabulation with *, all vars used in tables must be in the class statement

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

What does () do in type statement?

A

gives the descriptive statistic required across all observations in the data set

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

OUTPUT OUT syntax

A

OUTPUT OUT = data-set statistic(variable-list) = name-list

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

value of TYPE

A

depends on the level of interaction.
The observation where TYPE has a value of zero is the grand total.

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

Practice: Frequencies for the variables rank, grade, race, and gender

A

proc freq data = one;
tables rank grade race gender/ list missing;
run;

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

Frequencies on all CHARACTER variables in the data set;

A

proc freq data=one;
tables character/ list missing;
run;

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

one way PROC FREQ options

A

Must include / in the TABLES statement
LIST: display counts in list format;
MISSING: includes missing values in frequencies and percentages;
NOCUM: suppresses cumulative frequencies;
NOPERCENT: suppresses printing of percentages;
OUT = dataset: writes out a data set containing frequencies

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

two-way PROC FREQ options

A

CROSSLIST: displays crosstabulations in list forat with totals
NOCOL: suppresses column perentages;
NOROW: suppresses row percentages

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

Cross tabulation

A

use an asterisk between variables;
proc freq data = one;
tables genderraceanothervar; /* can be more than two vars*/
run;

17
Q

PROC FORMAT syntax

A

proc format;
value format-name range1 = ‘label1’
range2 = ‘label2’;
run;

18
Q

Rules for format names

A

** must begin with a dollar sign ($) if the format applies to character data;
** must be a valid SAS name (up to 32 characters, including $ sign if needed);
** cannot be the name of an existing SAS format;
** cannot start or end in a number;
** The only characters allowed are underscores (_);

19
Q

When to use periods when doing proc format?

A

The format name does not end in a period(.) when specified in a VALUE statement.
However, it must be referenced with period(.) at the end when on the FORMAT statement.

20
Q

proc format example

A

proc format;
* format for a numeric variable;
value survresponse 1=’Yes’
2=’No’
3=’Did Not Answer’;
* format for a character variable;
value $racecode ‘W’=’White’
‘B’=’Black’
‘H’=’Hispanic’;
* format that uses value ranges of a numeric variable;
value agegroup 13 - <20 =’Teen’
20 - <65 =’Adult’
65 - HIGH=’Senior’; **Note: you can use the keywords HIGH and LOW to refer to extreme values for you range;
run;