Chapter Contents

Previous

Next
The STANDARD Procedure

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
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.

MEAN=mean-value
standardizes variables to a mean of mean-value.
Alias: M=
Default: mean of the input values
Featured in: Standardizing to a Given Mean and Standard Deviation

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.
Alias: S=
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. Possible Values for VARDEF= 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 [IMAGE], where [IMAGE] is the corrected sums of squares and equals [IMAGE]. When you weight the analysis variables, [IMAGE] equals [IMAGE] where [IMAGE] is the weighted mean.
Default: DF
Tip: When you use the WEIGHT statement and VARDEF=DF, the variance is an estimate of [IMAGE], where the variance of the ith observation is [IMAGE] and [IMAGE] 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 [IMAGE], where [IMAGE] 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


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.