Restructuring of SPSS Data Files

Foreword:

The reference textbook for this column is "SPSS22.0 from entry to mastery". Due to the software version, some content has changed. In order to adapt to the change of the software version, this column is hereby created for everyone to learn. The software used in this column is: SPSS25.0

All the data files in this column can be obtained from the personal homepage - my resources !

The structure of the data file includes two types: one is the case group structure, that is, the vertical structure; the other is the variable group structure, that is, the horizontal structure.

There are three ways to reorganize data files:

  • 1. Reorganize selected variables into cases
  • 2. Reorganize selected cases into variables
  • 3. Transform all data: that is, data transposition (see SPSS data transposition )

1. Reorganization of selected variables into cases

1. Open the file

2. Select "Data" - "Refactor", the following dialog box pops up, select the first option: Restructure selected variables into cases

3. Select the number of variable groups, choose one in this article 

 3. Select the variable: select the variable according to the figure below, and rename the target variable to PH

 4. Create an index variable: choose one in this article

 

5. Create an index variable: select consecutive numbers and name it as batch

 6. The option adopts the default method, as shown in the figure

 

7. Click Refactor data now, then click Finish 

 

 8. The final reconstructed result is as follows

2. Reorganize selected cases into variables

1. Open the data file data03-05 (2), as follows

 2. Select "Data" - "Refactor", the following dialog box pops up, select the second option: Refactor selected cases into variables

 3. Select variables according to the figure below

 

4. Data sorting: Select "Yes" and click Next

 

5. Select as shown below, and then click Next

 

6. Select according to the figure below, and then click Finish 

 

7. The result after reorganizing the selected cases into variables is as follows: 

 

 

Guess you like

Origin blog.csdn.net/m0_64087341/article/details/131874369