In the variable window press ‘New Variable’à’Group Variables’ and a window pops up from where we can choose variables to group.
Based on three examples we will describe the detailed features of the function:
The example dataset contains two variables ‘Gender’ (two categories) and ‘Department’ (five categories). If we select these two variables to define the Group Variable, the output will be a derived variable containing the 5+2 categories:
The test dataset contains four variables regarding relations to other departments. Each variable contains one category, ‘1’ = ‘a relation’.
We can produce a derived variable based on these four variables, but as the category name in each variable is the same it is relevant to replace it by the name of the underlying variable:
The test dataset contains four variables regarding Microsoft Office training courses.
The category ‘1’ means participation in the individual course and ‘0’ not participated.
If a variable contains the two categories ‘0’ and ‘1’ OfficeReports will automatically give these categories values corresponding to their names.
We now want to group those who have participated in the courses into a new derived variable containing 5 categories:
- ‘Missing’ = did not participate in any of these
In the variable window press ‘New Variable’à’Group Variables’ and select the 4 course variables. Then check the ‘Exclude categories with the value ‘0’’, and press ‘Create Group Variable’.
OfficeReports will now produce a new derived variable like this:
As we have excluded all categories with the value ‘0’ each of the variables now contains one category; ‘1’.
OfficeReports detects the equal names and replace the similar names with the variable names – in this case ‘Outlook’, ‘Word’ etc.
Additionally, OfficeReports will add an extra category ‘Missing’. This category is defined by all the all the excluded categories – in this case (Outlook=0 AND Word=0 AND Excel=0 AND PowerPoint=0)
Read more in the video: Video: Grouping 0/1 variables