STANDARD Procedure
PROC STANDARD Statement
Standardizes variables in a SAS data set to a given
mean and standard deviation, and it creates a new SAS data set containing
the standardized values.
Syntax
Summary of Optional Arguments
specifies the input data set.
excludes observations with nonpositive weights.
specifies the mean value.
specifies the output data set.
replace missing values with a variable mean or MEAN=
value
specifies the standard deviation value.
specifies the divisor for variance calculations.
Control printed output
suppresses all printed output.
prints statistics for each variable to standardize.
Preserve values
preserves raw by values
Without Arguments
If you do not specify
MEAN=, REPLACE, or STD=, the output data set is an identical copy
of the input data set.
Optional Arguments
- DATA=SAS-data-set
- specifies the input
SAS data set.
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.
Default:mean of the input values
- NOPRINT
- suppresses the printing
of the procedure output. NOPRINT is the default value.
- OUT=SAS-data-set
- specifies 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.
- PRESERVERAWBYVALUES
- preserves raw by values of all BY variables
when those variables are propagated to the output data set.
- PRINT
- prints the original
frequency, mean, and standard deviation for each variable to standardize.
- REPLACE
- replaces missing values
with the variable mean.
Interaction:If you use MEAN=, PROC STANDARD replaces missing
values with the given mean.
- STD=std-value
- standardizes variables
to a standard deviation of std-value.
Default:standard deviation of the input values
- 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=
The procedure computes
the variance as
, where
is the corrected sums of squares and equals
. When you weight the analysis variables,
equals
where
is the weighted mean.
Default:DF
Tips:When you use the WEIGHT statement and VARDEF=DF, the variance
is an estimate of
, where the variance of the
ith
observation is
and
is the weight for the
ith
observation. This yields an estimate of the variance of an observation
with unit weight.
When you use the WEIGHT statement and VARDEF=WGT, the
computed variance is asymptotically (for large n)
an estimate of , where is the average weight. This yields an asymptotic
estimate of the variance of an observation with average weight.
Keywords and Formulas
Copyright © SAS Institute Inc. All rights reserved.