Previous Page | Next Page

The STANDARD Procedure

PROC STANDARD Statement


PROC STANDARD <option(s)>;

Task 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

Suppress all printed output NOPRINT


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

identifies the input SAS data set.

Main discussion: Input Data Sets
Restriction: You cannot use PROC STANDARD with an engine that supports concurrent access if another user is updating the data set at the same time.
EXCLNPWGT

excludes observations with nonpositive weight values (zero or negative). The procedure does not use the observation to calculate the mean and standard deviation, but the observation is still standardized. By default, the procedure treats observations with negative weights like those with zero weights and counts them in the total number of observations.

Alias: EXCLNPWGTS
MEAN=mean-value

standardizes variables to a mean of mean-value.

Default: mean of the input values
Featured in: Standardizing to a Given Mean and Standard Deviation
NOPRINT

suppresses the printing of the procedure output. NOPRINT is the default value.

OUT=SAS-data-set

identifies the output data set. If SAS-data-set does not exist, PROC STANDARD creates it. If you omit OUT=, the data set is named DATAn, where n is the smallest integer that makes the name unique.

Default: DATAn
Featured in: Standardizing to a Given Mean and Standard Deviation
PRINT

prints the original frequency, mean, and standard deviation for each variable to standardize.

Featured in: Standardizing BY Groups and Replacing Missing Values
REPLACE

replaces missing values with the variable mean.

Interaction: If you use MEAN=, PROC STANDARD replaces missing values with the given mean.
Featured in: Standardizing BY Groups and Replacing Missing Values
STD=std-value

standardizes variables to a standard deviation of
std-value.

Default: standard deviation of the input values
Featured in: Standardizing to a Given Mean and Standard Deviation
VARDEF=divisor

specifies the divisor to use in the calculation of variances and standard deviation. The following table shows the possible values for divisor and the associated divisors.

Possible Values for VARDEF=
Value Divisor Formula for Divisor
DF degrees of freedom n - 1
N number of observations n
WDF sum of weights minus one ([Sigma]iwi) - 1
WEIGHT|WGT sum of weights [Sigma]iwi

The procedure computes the variance as [equation], where [equation] is the corrected sums of squares and equals [equation]. When you weight the analysis variables, [equation] equals [equation] where [equation] is the weighted mean.

Default: DF
Tip: When you use the WEIGHT statement and VARDEF=DF, the variance is an estimate of [equation], where the variance of the ith observation is [equation] and [equation] is the weight for the ith observation. This yields an estimate of the variance of an observation with unit weight.
Tip: When you use the WEIGHT statement and VARDEF=WGT, the computed variance is asymptotically (for large n) an estimate of [equation], where [equation] is the average weight. This yields an asymptotic estimate of the variance of an observation with average weight.
See also: WEIGHT
Main discussion: Keywords and Formulas

Previous Page | Next Page | Top of Page