Functions and CALL Routines |
Category: | Mathematical |
Interaction: | When invoked by the %SYSCALL macro statement, CALL STDIZE removes the quotation marks from its arguments. For more information, see Using CALL Routines and the %SYSCALL Macro Statement. |
Syntax | |
Arguments | |
Details | |
Comparisons | |
Examples |
Syntax |
CALL STDIZE(<option-1, option-2, ...,>variable-1<,variable-2, ...>); |
specifies a character expression whose values can be uppercase, lowercase, or mixed case letters. Leading and trailing blanks are ignored.
option includes the following three categories:
specify how to compute the location and scale measures that are used to standardize the variables. The following standardization options are available:
must be followed by an argument that is a numeric expression specifying the tuning constant.
must be followed by an argument that is a numeric expression that specifies the proportion of pairs to be included in the estimation of the within-cluster variances.
must be followed by an argument that is a numeric expression specifying the tuning constant.
must be followed by an argument that is a numeric expression specifying the tuning constant.
must be followed by an argument that is a numeric expression with a value greater than or equal to 1 specifying the power to which differences are to be raised in computing an L(p) or Minkowski metric.
specifies the middle number in a set of data that is ordered according to rank.
must be followed by an argument that is a numeric expression that specifies the proportion of data to be contained in the spacing.
specifies the standard deviation about the origin, based on the uncorrected sum of squares.
specify the divisor to be used in the calculation of variances. VARDEF options can have the following values:
Miscellaneous options can have the following values:
is followed by a numeric argument that specifies a number to add to each value after standardizing and multiplying by the value from the MULT= option. The default value is 0.
is followed by a numeric argument that specifies the relative fuzz factor.
is followed by a numeric argument that specifies a value to be assigned to variables that have a missing value.
is followed by a numeric argument that specifies a number by which to multiply each value after standardizing. The default value is 1.
normalizes the scale estimator to be consistent for the standard deviation of a normal distribution. This option affects only the methods AGK=, IQR, MAD, and SPACING=.
writes the values of the location and scale measures in the log.
replaces missing values with the value 0 in the standardized data (this value corresponds to the location measure before standardizing). To replace missing values by other values, see the MISSING= option.
normalizes the scale estimator to have an expectation of approximately 1 for a standard normal distribution.
Tip: | This option affects only the SPACING= method. |
is numeric. These values will be standardized according to the method that you use.
Details |
The CALL STDIZE routine transforms one or more arguments that are numeric variables by subtracting a location measure and dividing by a scale measure. You can use a variety of location and scale measures. The default location option is MEAN, and the default scale option is STD.
In addition, you can multiply each standardized value by a constant and you can add a constant. The final output value would be
result |
specifies the final value that is returned for each variable. |
add | |
mult | |
original | |
location | |
scale |
You can replace missing values by any constant. If you do not specify the MISSING= or the REPLACE option, variables that have missing values are not altered. The initial estimation method for the ABW=, AHUBER=, and AWAVE= methods is MAD. Percentiles are computed using definition 5. For more information about percentile calculations, see SAS Elementary Statistics Procedures in Base SAS Procedures Guide.
Comparisons |
The CALL STDIZE routine is similar to the STDIZE procedure in the SAS/STAT product. However, the CALL STDIZE routine is primarily useful for standardizing the rows of a SAS data set, whereas the STDIZE procedure can standardize only the columns of a SAS data set. For more information, see PROC STDIZE in SAS/STAT User's Guide.
Examples |
The following SAS statements produce these results.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.