There are several situations in which you might want to import document variables into MAXQDA, such as:
- If a standardized questionnaire was used to augment interviews.
- If you did statistical analysis on data that you exported from MAXQDA and now want to reimport the results of your statistical analysis into MAXQDA. You could, for example, have done a cluster analysis for 40 interviews and now want to import the cluster assignments from each individual interview.
Importing document variables from Excel
MAXQDA can import data from XLS/X files. The data must be organized as follows:
Document group | Document name | Variable 1 | ... | Variable N |
---|---|---|---|---|
Group 1 | Text 1 | Variable value for Text 1 | Variable value for Text 1 | |
Group 1 | Picture 1 | Variable value for Picture 1 | Variable value for Picture 1 |
The first two column headers serve as markers for assigning variable values to the documents and are required for successful import. Every row must have an entry for the document group and document name columns. Only if these exact group and document names are found in the “Document System” of the MAXQDA project, will the variables and variable values be imported. You can then include as many different variable columns as you wish.
After preparing and saving the document, you can start the import procedure by going to Variables > Import Document Variables. Alternatively, you can click on the Import data (document variables) symbol in the List of Document Variables.
A dialog field appears in which you can specify the source and target variables along with the type of variables to be imported.
MAXQDA does the following during the import:
- All variables in the import file that did not yet exist in the MAXQDA project are created.
- Variables that already existed will be updated with the new values in the import file.
- Empty values (“system missings”) for variable types integer and decimal will be imported as -999.
Importing document variables from SPSS
You can also import a data matrix for the document variables from a SPSS data file (extension SAV). For the import, MAXQDA needs to match the cases of the SPSS data file with the document names in the opened MAXQDA project. Therefore it is necessary, that the data file contains a variable (a column) for the document group as well as a variable for the document name.
- Start the import procedure via Variables > Import Document Variables. Alternatively, you can click on the Import data (document variables) symbol in the List of Document Variables.
- Then choose a SPSS data file in the appearing file dialog.
- A new dialog will appear, that allows you to set several options:
In the upper part you can select which variables (= columns) contain the information about the document group and the document name to match the cases with the appropriate document name. MAXQDA will choose the first two columns of the SPSS data file if the data file doesn’t contain variables with the names “DocGroup” and “DocName.” You will find the variable labels in brackets behind the variable names for better navigation in the list of variables.
Furthermore, you can switch on two additional options:
Import variable label instead of variable name – If you choose this option, MAXQDA won’t import the variable names, but their labels, which are usually longer and easier to read and to understand. You should use this option, if you want to import a SPSS data file that has been created by exporting the document variables from MAXQDA. Then it will be easy to update a variable which values have been changed in SPSS. Please note that the length of variable names in MAXQDA is limited to 63 characters, so a longer label may be truncated.
Import value labels instead of values – usually, standardized answers will be represented in SPSS by numbers, e.g. a 1 may be used for “female” and a 2 for “male”. If you see these numbers only in MAXQDA without knowing what a “1” and “2” means, it won’t be very useful, so this option should only be deactivated if you are sure you want to import the values instead.
A dialog field appears in which you can specify the source and target variables along with the type of variables to be imported.
MAXQDA does the following during the import:
- All variables in the import file that did not yet exist in the MAXQDA project are created.
- Variables that already existed will be updated with the new values in the import file.
- If you have defined missing values in SPSS only the first missing value (defined in section “Discrete missing values” in the SPSS dialog) will be imported (only for variable types integer and floating).
- System variables of MAXQDA won’t be changed.
- If the import file contains identical document names in the same document group, the last case will overwrite the previous ones.
- Empty values (“system missings”) for variable types integer and decimal will be imported as -999.
Importing code variables from Excel
MAXQDA can import data from XLS/X files. The data must be organized as follows:
Code | Variable 1 | ... | Variable N |
---|---|---|---|
Parent code 1\Code 1 | Variable value for code 1 | Variable value for code 1 | |
Parent code 1\Code 2 | Variable value for code 2 | Variable value for subcode 2 |
The first column heading is the unambiguous assignment of variable values to a code, so this column and its heading are mandatory. Each line must designate a code in the corresponding column. For subcodes, the entire path must be specified in the code system, in which the codes are separated by a backslash “\”.
Only when a code, which matches this information exactly, is found in the “Code System” will the variable be imported. You can add as many variables as required in the subsequent columns.
After preparing and saving the import data, you can then start the import procedure by going to Variables > Import Code Variables. Alternatively, you can click on the Import data (code variables) button in the List of Code Variables.
A dialog field appears in which you can specify the source and target variables along with the type of variables to be imported.
MAXQDA does the following during the import:
- All variables in the import file that did not yet exist in the MAXQDA project are created.
- Variables that already existed will be updated with the new values in the import file.