This article describes how to create a new variable(s) that is standardized and will have an average of 0 for each respondent, and will optionally have a standard deviation of 1 for each respondent. Please consider the data below:
For each column/variable in the data, this QScript will subtract the mean of the column from each entry and then divide by the standard deviation of the column to yield the following
Requirements
- A Displayr document that contains one or more Nominal - Multi, Ordinal - Multi, Numeric - Multi, Numeric - Grid, Nominal, Ordinal or Numeric variable sets.
Method
To use this transformation:
- Select one or more Nominal - Multi, Ordinal - Multi, Numeric - Multi, Numeric - Grid, Nominal, Ordinal or Numeric variable sets in the Data Sources tree.
- Hover and click Plus (+) > Numeric Transformations > Scale > Standardize Within Variable.
- A new variable set containing the standardized data within the variable is created.