Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4

Tip: Supports the Output Delivery System. See Output Delivery System on page 32 for details.

ODS Table Name : Standard

Reminder: You can use the ATTRIB, FORMAT, LABEL, and WHERE statements. See Chapter 3, Statements with the Same Function in Multiple Procedures, on page 57 for details. You can also use any global statements. See Global Statements on page 18 for a list.

PROC STANDARD < option(s) >;

To do this

Use this statement

Calculate separate standardized values for each BY group

BY

Identify a variable whose values represent the frequency of each observation

FREQ

Select the variables to standardize and determine the order in which they appear in the printed output

VAR

Identify a variable whose values weight each observation in the statistical calculations

WEIGHT

PROC STANDARD Statement

PROC STANDARD < option(s) >;

To do this

Use this option

Specify the input data set

DATA=

Specify the output data set

OUT=

Computational options

Exclude observations with nonpositive weights

EXCLNPWGT

 

Specify the mean value

MEAN=

 

Replace missing values with a variable mean or MEAN= value

REPLACE

 

Specify the standard deviation value

STD=

 

Specify the divisor for variance calculations

VARDEF=

Control printed output

 

Print statistics for each variable to standardize

PRINT

Without Options

If you do not specify MEAN=, REPLACE, or STD=, the output data set is an identical copy of the input data set.

Options

DATA= SAS-data-set

EXCLNPWGT

MEAN= mean-value

OUT= SAS-data-set

PRINT

REPLACE

STD= std-value

VARDEF= divisor

BY Statement

Calculates standardized values separately for each BY group.

Main discussion: BY on page 58

Featured in: Example 2 on page 1187

BY <DESCENDING> variable-1 < <DESCENDING> variable-n ><NOTSORTED>; Required Arguments

variable

Options

DESCENDING

NOTSORTED

FREQ Statement

Specifies a numeric variable whose values represent the frequency of the observation.

Tip: The effects of the FREQ and WEIGHT statements are similar except when calculating degrees of freedom.

See also: For an example that uses the FREQ statement, see FREQ on page 61

FREQ variable ;

Required Arguments

variable

VAR Statement

Specifies the variables to standardize and their order in the printed output.

Default: If you omit the VAR statement, PROC STANDARD standardizes all numeric variables not listed in the other statements.

Featured in: Example 1 on page 1185

VAR variable(s) ;

Required Arguments

variable(s)

WEIGHT Statement

Specifies weights for analysis variables in the statistical calculations.

See also: For information about calculating weighted statistics and for an example that uses the WEIGHT statement, see WEIGHT on page 63

WEIGHT variable ;

Required Arguments

variable

Категории