Module 8: Producing Descriptive Statistics Flashcards

1
Q

What is PROC MEANS?

A

A procedure that helps get basic statistics for the numeric variables in a data set.

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

List some options for proc means.

A

Maxdec = n, missing, max min, median, mean, mode, n, nmiss, range, stdev, sum

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

What do the options Maxdec = n, Missing, N, and Nmiss do?

A

Maxdec: n rounds the values to n decimals
Missing: treats missing values as a seperate group of values
N: number of non-missing values
Nmiss: number of missing values

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

What are optional statements that you can use in proc means?

A

var: specifiies varaibles to use
by: seperates into levels by by-variable(s)*
class: also performs separate analysis for each levels**
types: used to specify a combination of CLASS variables to produce
output out=: data-set output-statistic list

*needs to be sorted
**note that all type var need to be in class

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

To save out the output to a data set, you need to:

A

1) Use a noprint option in the proc means statement
2) Specify the descriptive statistics required on the OUTPUT statement

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

What is the type automatic variable?

A

Value displaying the type of interation. And zero value is the grand total.

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

What is the difference between one-way and two-way frequencies?

A

One-way freq counts are for 1 variable
Two-way freq counts are for 2 variables

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

Why do we use PROC FREQ?

A

To create tables showing the distribution of categorical variables in a data set.

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

How do you add options to PROC FREQ? Also list those options.

A

Option must appear after a slash (/) in the TABLES statement
Options: list, missing, nocum nopercent, and out =

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

What do these options do: list, missing, nocum, nopercent.

A

List: displays couns in list form
Missing: includes missing values in freq and percentages
Nocum: supresses cumulative freq
Nopercent: suppresses printing of percentages

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

Write the general syntax for multi-way freq/cross tabulations with PROC FREQ.

A

proc freq data=dataset;
tables var1*var2;
run;

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

What are the specific options for multi-way freqs?

A

Crosslist: displays crosstabulations in list format with totals
Nocol: supresses column percentages
Norow: supresses row percentages

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

What is the general syntax for user defined formats?

A

Proc format;
value format-name range = ‘label’

Note: semicolon goes at the end of the LAST range and label…

when formating multiple ranges in one value code.

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

What are the rules for format names?

A

1) Must begin with a $ if the format applies to character data
2) Must be a valid SAS name (up to 32 characters)
3) Cannot be the name of an existing SAS format
4) Cannot stort or end in a number
5) Only characters allowed are underscores

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

Write a proc format for numeric variables, character variables, and one with value ranges of a numeric variable.

A

proc format;
1) value survresponse 1 = ‘Yes’;
2) value $racecode ‘W’ = ‘White’;
3) value agegroup 13 - <20 = ‘Teen’;

Note: can use 65 - HIGH in range to indicate extreme values (or LOW)

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

T/F: The keyword OTHER can be used to assign a format to any values not listed in the VALUE statement.

A

True

17
Q

T/F: You cannot assign non-continous ranges in a format.

A

False: You can. Separte them with a comma.
Ex. value odd 1,3,5,7 = ‘Odd’;

18
Q

Assign the format survresponse to the variable q3, assuming q3 has numeric values.

A

data dataset;
set dataset
format q3 survresponse.;
run;

19
Q

Write the syntax to assign new formats to a new varaible.

A

newvar = put(oldvar, format);

20
Q

How do you permanently store a format?

A

Specify the libname statement with the libreference.
Ex. proc format lib = libname;

21
Q

How do you display user-defined formats?

A

Add the keyword FMTLIB in the proc format. Displays all formats in catelog along with descriptions of values.
Ex. proc format lib = formatlib fmtlib;