Transform variable
- Constrain a Variable to a Given Interval Linear transformation of all variable values to fit within interval of 2 values. Basic solution and generalizations with macros.
- Convert Numbers to String with Leading Zeros Syntax creates string of fixed width from number (like, say, post code). Unused number positions are filled with zeros
- Create Variable Equal to z-scores of an Existing Variable Syntax shows how to save standardized copy of a variable through DESCRIPTIVES procedure.
- Extract Fist or First 2 Digits of a Large Integer Number of digits to extract depends on the length of the original number. Elegant solution via logarithm
- Global Autorecode How to automatically assign codes to variable values with common coding per variable group
- Replace a Letter to 9999 and Convert to Number Replacing some letter to a string representation of a number and subsequent conversion to a number variable
- Replace Confidential Information (e.g. a SSN) by a New (Known) ID This syntax matches file with SSN-ID keys to the file with SSN personal data. Sensitive information is removed from the resulting file aftewards.
- Replace Values Higher than ``n`` by the Mean of the Other Values 1 First, mean statistic is calculated by AGGREGATE on conditioned sample. Then mean is matched with original file, replacing higher values.
- Automatically Rescale Variable to be Between 0 and 1 Example of a macro to rescale any variable within given bounds
- Transform Alphanumeric Codes to Numeric Transformation of string codes to numeric
- Examples of Converting Strings To Numbers Several examles of conversion strings to numbers using different string types
- Calculate utility of EuroQol 5D questionnaire Calculated Utility of EuroQol 5D
Related pages
...
Navigate from here