Restructure Data Wizard (Variables to Cases): Select Variables
In this step, provide information about how the variables in the current file should be used in the new file. You can also create a variable that identifies the rows in the new file.
How should the new rows be identified? You can create a variable in the new data file that identifies the row in the current data file that was used to create a group of new rows. The identifier can be a sequential case number or it can be the values of the variable. Use the controls in Case Group Identification to define the identification variable in the new file. Click a cell to change the default variable name and provide a descriptive variable label for the identification variable.
What should be restructured in the new file? In the previous step, you told the wizard how many variable groups you want to restructure. The wizard created one new variable for each group. The values for the variable group will appear in that variable in the new file. Use the controls in Variable to be Transposed to define the restructured variable in the new file.
To Specify One Restructured Variable
- Put the variables that make up the variable group that you want to transform into the Variable to be Transposed list. All of the variables in the group must be of the same type (numeric or string).
You can include the same variable more than once in the variable group (variables are copied rather than moved from the source variable list); its values are repeated in the new file.
To Specify Multiple Restructured Variables
- Select the first target variable that you want to define from the Target Variable drop-down list.
- Put the variables that make up the variable group that you want to transform into the Variable to be Transposed list. All of the variables in the group must be of the same type (numeric or string). You can include the same variable more than once in the variable group. (A variable is copied rather than moved from the source variable list, and its values are repeated in the new file.)
- Select the next target variable that you want to define, and repeat the variable selection process for all available target variables.
- Although you can include the same variable more than once in the same target variable group, you cannot include the same variable in more than one target variable group.
- Each target variable group list must contain the same number of variables. (Variables that are listed more than once are included in the count.)
- The number of target variable groups is determined by the number of variable groups that you specified in the previous step. You can change the default variable names here, but you must return to the previous step to change the number of variable groups to restructure.
- You must define variable groups (by selecting variables in the source list) for all available target variables before you can proceed to the next step.
What should be copied into the new file? Variables that aren't restructured can be copied into the new file. Their values will be propagated in the new rows. Move variables that you want to copy into the new file into the Fixed Variable(s) list.