Variable Transformation in SPSS

The following working examples refer to the practice dataset from the practice questionnaire .

1. Compute

1.1 Transform -> Compute

1.2 We want to construct a new variable to examine whether TV is a major source of advertisement received by our respondents.

1.3 Assign a new variable name (tvad) and apply the appropriate formula:
compute tvad = v203 + v603 + v1003 + v1403 + v1803.
execute.

1.4 Likewise, you may construct similar variables for other media of advertisment.

1.5 After we have constructed 6 new variables, we can compare which source is the most popular, and which is the least, using the Frequencies command to examine the distributions.
 

2. Count

2.1 Transform -> Count

2.2 We want to construct a new variable to examine how important TV is the source of advertisment referenced by our respondents.

2.3 Assign a new variable name (tvref)

2.4 Likewise, you may construct similar variables for other media of advertisment.

2.5 After we have constructed 6 new variables, we can compare which source is the most important, and which is the least, use the Frequencies command to examine the distributions.
 

3. Recode - Another Ways to creat new variable

3.1 In the above examples, you may or may not notice that Compute and Count are able to create new variables.

3.2 There are other commands in SPSS have the same function of creating new variables.  Among others, a commonly used procedure is Recode ... Into Different Variables .

3.3 In its simple operation, Recode is used to:

3.4 Recode ... Into Different Variables offer an alternative to keep original values and perform transformation to the original values by storing in a new variable.

3.5 Since Recode ... Into Different Variables creates a new variable, labels and missing value have to be defined again.

3.6 Either simple Recode or Recode ... Into Different Variables does not require to tranform all original values.  But the results are different.

3.7 Simple Recode

3.8 Recode ... Into Different Variables 3.9 Transform -> Recode ->


4. To record procedures of variable transformation

4.1 Keep track of what you have done to the variables.

4.2 To apply the same procedures when new cases are added.

4.3 In all procedures, click    button instead of OK.
4.4 The SPSS Syntax Editor will pop-up, the commands of the corresponding tranformation are shown.

4.5 Highlight the necessary commands and also the "EXECUTE."

4.6 Press the Run Current button to complete the transformation.

4.7 If the result of the tranformation (and other procedures) meet your request, click the SPSS Syntax Editor window and save the syntax file, the extension of the file will be .sps .

4.8 At later time to re-use the commands, File -> Open -> Syntax
 

5. Basic Data Analysis

5.1 Univariate analysis: Analyze ->

5.2 Bivariate analysis: Analyze -> 5.3 Revision on basic inferential statistics