String Variables

String variables are variables that hold zero or more characters such as letters, numbers, spaces, commas and many more. You can’t use numeric functions such as addition or subtraction on string variables. You can, however, extract one or more characters (a substring) from them, glue them together (concatenate) and a couple of other functions. Like so, working […]

SPSS AUTORECODE Command

SPSS AUTORECODE – Minimal Example autorecode str_var1 str_var2 str_var3 /into num_var1 num_var2 num_var3. Introduction This tutorial explains SPSS’ AUTORECODE command and shows how to use it properly on nominal_strings.sav, a screenshot of which is shown below. We recommend downloading this data file and following along with the steps in this tutorial. SPSS AUTORECODE – What Is It? […]

SPSS String Variables Tutorial

Working with string variables in SPSS is pretty straightforward if one masters some basic string functions. This tutorial will quickly walk you through the important ones. SPSS Main String Functions CHAR.SUBSTR (substring) – Extract character(s) from string CONCAT (concatenate) – Combine strings CHAR.INDEX – Find first occurrence of character(s) in string CHAR.RINDEX (right index) – Find last occurrence of character(s) in […]