![]() |
STANDARDIZEName:
This command provides additional flexibility in that either one or two group id variables can also be specified. That is, if one group id variable is given, the mean and standard deviation is computed for each group and the data values are standardized by the corresponding group mean and standard deviation. Likewise, if two group variables are specified, then a mean and standard deviaiton are computed for each cell of the cross tabulation and the data values are standardized by the corresponding cell mean and standard deviaition. You can specify several alternative measures to the mean for the location statistic and several alternative measures to the standard deviaition for the scale statistic. See the Note below for details. In addition, you can choose to standardize only by location (i.e., subtract the mean but do not divide by the standard deviation) or only by scale. You can also specifically specify a z-score or u-score. A z-score subtracts the mean and divides by the standard deviation (i.e,, it scales to a standard normal distribution). Similarly, the u-score subtracts the minimum and divides by the range. That is, it creates a standard uniform random variable (i.e., the data is scaled to a range between 0 and 1). If a z-score or u-score is explicitly requested, the settings for the SET LOCATION STATISTIC and SET SCALE STATISTIC (see Note below) are ignored.
where <y1> is the response variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes (with respect to both location and scale) the variable with no groups.
where <y1> is the response variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes the variable (with respect to location only) with no groups.
where <y1> is the response variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes the variable (with respect to scale only) with no groups.
where <y1> is the response variable; <var> is a variable where the z-score values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax specifically computes a z-score.
where <y1> is the response variable; <var> is a variable where the u-score values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax specifically computes a u-score.
where <y1> is the response variable; <x1> is a group id variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes (with respect to both location and scale) the variable with one group variable.
where <y1> is the response variable; <x1> is a group id variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes the variable (with respect to location only) with one group variable.
where <y1> is the response variable; <x1> is a group id variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes the variable (with respect to scale only) with one group variable.
where <y1> is the response variable; <x1> is a group id variable; <var> is a variable where the z-score values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax computes a z-score with one group variable.
where <y1> is the response variable; <x1> is a group id variable; <var> is a variable where the u-score values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax computes a u-score with one group variable.
where <y1> is the response variable; <x1> is the first group id variable; <x2> is the second group id variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes (with respect to both location and scale) the variable with two group variable.
<SUBSET/EXCEPT/FOR qualification> where <y1> is the response variable; <x1> is the first group id variable; <x2> is the second group id variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes the variable (with respect to location only) with two group variable.
<SUBSET/EXCEPT/FOR qualification> where <y1> is the response variable; <x1> is the first group id variable; <x2> is the second group id variable; <var> is a variable where the standardized values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax standardizes the variable (with respect to scale only) with two group variable.
<SUBSET/EXCEPT/FOR qualification> where <y1> is the response variable; <x1> is the first group id variable; <x2> is the second group id variable; <var> is a variable where the z-score values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax computes a z-score with two group variables.
<SUBSET/EXCEPT/FOR qualification> where <y1> is the response variable; <x1> is the first group id variable; <x2> is the second group id variable; <var> is a variable where the u-score values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax computes a u-score with two group variables.
LET Y2 = LOCATION STANDARDIZE Y1 LET Y2 = LOCATION STANDARDIZE Y1 X1 LET Y2 = LOCATION STANDARDIZE Y1 X1 X2
SET LOCATION STATISTIC MEDIAN
To set the location measure, enter the command
To set the scale measure, enter the command
Here, SD is the standard deviation, MAD is the median absolute deviation, and AAD is the average absolute deviaiton. Note the using the ZSCORE or USCORE syntax overrides the settings specified by these SET commands. That is, ZSCORE always uses the mean and standard deviation and USCORE always uses the minimum and the range.
2001/9: Following updates made
READ GEAR.DAT Y X LET Y2 = STANDARDIZE Y X
READ GEAR.DAT Y X LET Y2 = LOCATION STANDARDIZE Y X
READ GEAR.DAT Y X SET LOCATION STATISTIC MEDIAN SET SCALE STATISTIC MAD LET Y2 = STANDARDIZE Y X
READ RIPKEN.DAT Y X1 X2 LET Y2 = STANDARDIZE Y X1 X2
Date created: 6/5/2001 |