This article is part of The Definitive Guide to Importing and Preparing Data.
Grouping variables into arrays (grids) and multiple response questions is a very important first step to ensure that the dataset is set up correctly. In Crunch, you do not need to show the individual contributing variables separately if they are meant to be combined into a single variable.
Note: If you haven't already, it is strongly recommended that you read Recommendations for setting up a clean and tidy dataset.
Importing from an SPSS file:
- Very commonly SPSS files lack the metadata that defines grid and multiple response variable groupings by default. However, there are commands in SPSS syntax that can define these groupings (MCGROUP for grids and MDGROUP for multiple response) and you have the option of setting this metadata on the .sav file before you upload it to Crunch. In this case, Crunch has the information that it needs and will import them in as the intended grouped variables.
- If the SPSS file does not include the metadata to group variables into arrays (categorical arrays, multiple response, and numeric arrays) then you need to group them after you upload. Making these groupings in Crunch is referred to as deriving arrays. This means you are making new variables and leaving the individual contributing variables intact in the Variable Sidebar.
Note: Crunch Automation commands have an optional argument, HIDE INPUTS, that will automatically move the individual contributing variables to the hidden folder, removing them from the Variable Sidebar. Though they are hidden from view, they can still be referenced in other commands and calculations if needed.
Importing from a direct importer, CSV+JSON, API:
- If you use one of Crunch's importers (e.g., Decipher, Qualtrics, SurveyMonkey), a CSV + metadata description document (JSON), or a custom importer using the API, then arrays should already be defined during the import so you can skip this task. This is an example of how using a direct importer as part of your Crunch workflow can save time in setting up a dataset.
In the web app
You use the array builder from the + New variable button on the bottom left of the screen under the Variable Sidebar. Further instructions can be found here: Creating multiple response and categorical arrays.
Note: Once the combined variable has been created, you no longer need to show the individual contributing variables in the Variable Sidebar. Please see the Organizing Variables article for more information on how to hide variables from the sidebar.
Crunch Automation
- CREATE CATEGORICAL ARRAY
- CREATE MULTIPLE DICHOTOMY + CREATE MULTIPLE DICHOTOMY FROM CONDITIONS
- CREATE NUMERIC ARRAY
As making arrays is a very common task when setting up a dataset from SPSS files, you may wish to use the Script Builder to help generate the Crunch Automation script more efficiently.
Note: There are special Crunch Automation commands to deal with multiple response variables that are not in the dichotomous format needed for multiple response variables. In this case, CREATE MULTIPLE DICHOTOMY WITH RECODE should be used.