The Coding Query function in MAXQDA makes it possible for you to call up segments with selected codes in selected documents. For simple retrievals documents and/or document groups are activated manually in the “Document System.” For example, you can activate all the documents in a project, the documents of a specific document group, or individual docments based on specific criteria. This type of selection is sufficient so long as you wish to retrieve only coded segments belonging to a specific code. More complex, selective retrievals, however, can’t be done as easily with this method.
In addition to manual activation, there are also automatic activation options. With the Activate by document variable function, you can choose to activate documents based on the variable values that have been assigned to them. If you have defined variables for gender, age, and education level, for example, you could choose to select only those documents that represent women over the age of 40 that have at least a high school education. These activations can be made by entering the appropriate formulas. The formula syntax in MAXQDA is similar to that of statistics programs like SPSS.
The “Activate by document variables” function always processes the entire project. You can access the function by choosing Activation by document variables from the Mixed Methods drop-down menu or by right-clicking on the Documents icon in the “Document System” and choosing Activate by document variables from the context menu that appears.
After clicking on the appropriate button, a dialog window will appear where you can enter the formulas for activation. In the example mentioned above, we would want to activate only document with women over the age of 40 with a high school education. The dialog window is made up of the following sections:
- A section for the logical formulas and the buttons to create a new formula, delete the currently selected formula, or delete all formulas.
- Checkboxes for selecting operators.
- Buttons for opening or saving formulas.
- Buttons for carrying out the activations.
All logical conditions must have the following components:
variable name / operator / value
If you have created a variable called “gender” and used the characters “m” for male and “f” for female, we would use the following formula in order to activate those documents that are interviews with women:
gender = w
Let’s say a study was conducted about the effects of the Gulf Oil spill on the reputation of offshore drilling companies, and all documents have already been coded. A variable was created based on the presence or absence of a critique of drilling company management (”Criticism”). If there was such critique in a document, the variable value was set to “Y.” Otherwise it was set to “N.”
Now, if we only wanted to activate those documents that included critique of company management, we would use the following formula:
Criticism = Y
To do this, you would follow these steps:
Double-click on the variable Criticism from the list of variables. You will now see the following text in the formula window:
[Criticism] = <empty>
The only thing that is missing at this point is the variable value. On the right side of the screen you will see a field where you can enter the value. Here you could enter “Y,” or simply click on the arrow to open the drop-down menu and select a value from the list of all the values that have been entered for a document up to that point. In our example above, both “Y” and “N” would be in the menu. Using this menu helps you to avoid any typos.
Since the “=” operator is used most often, it is automatically selected when you start a new formula. If you want to use a different logical operator, simply choose it from the right side of the window.
The operators have the following meanings:
= Selects variable values that are the same as the formula value.
<> Selects variable values that are not the same as the formula value.
< Selects variables values that are smaller than the formula value.
> Selects variable values that are larger than the formula value.
In our example, we wanted to activate those documents where the person did include critique of the company management, so the “=” operator is appropriate. We would want to see those documents with the variable value equal to the formula value (”Y”).
If you are starting a formula with a numerical variable, a “0” is inserted automatically until you change it. When working with variables of type “Boolean” you can use “0” for “false”and “1” for “true”.
Results of Activations by Document Variable
Once you have entered the correct logical formulas, you can start the automatic activation. Click on the Activate button.
MAXQDA then checks the variable values assigned to each document to check whether it matches the formulated criteria. The automatic activation window is closed, and you will be brought back to the standard MAXQDA four-window interface. The documents that matched the criteria are now activated (marked red) in the “Document System.”
If you also had codes activated, you will immediately see results of your retrieval in the “Retrieved Segments” window.
If you want to activate documents frequently based on the same criteria, it is recommended that you save the activation model as a document set. To do so, select the option Activate and create set from the dialog window. MAXQDA will then activate not only all the documents that meet the defined variable conditions (formulas), but also create a document set containing the activated documents. This new document set can be activated at any time in the Document System, without having to call up the function for automatic activation via document variables.
Changing and Saving Formulas
After starting the automatic activation process, the dialog window is no longer seen. The formulas, however, will still be in that window the next time you open it.
You can change the logical formulas (operators and values) at any time:
- Click on the Formula in the dialog window, and select another operator.
- If you want to change the value, simply enter the new value or select it from the drop-down menu.
After you have changed the formula, click on the Activate button to restart the activation.
You can also save a formula, so that you can have quick access to it at a later time. Just click on the Save symbol at the bottom of the dialog window. You can then give it a name and choose where you want to save it.
Files for saved logical formulas are saved by MAXQDA as .LOA (logical activation) files. To open a saved formula, choose Open and navigate to the place you saved the .LOA file. It makes sense to set up a folder for all of your LOA files, so they are easy to find.
Complex Logical Formulas
It is also possible to combine various logical formulas. The basic units of these combinations are still the formulas in their basic form:
variable name / operator / value
Combining formulas just means that you are connecting two of these basic formulas with an operator.
In the above example, we activated documents where the value for the variable “Criticism” was “Y.”
If you want to further limit the results, so that you only see what women that critiqued management had to say, we would want to include a second formula where the value for the variable “Gender” is “f” for female.
This second formula would just need to be added and given the AND operator, so that documents will be found that have variable values indicating that it is a woman, and the woman critiqued management. The second formula, then, would be created as follows:
Double-click on the variable Gender from the list of variables.
The new formula should now look like this:
[Gender] = <empty>
- Enter the value f in the dialog field, or select it from the list of values.
- MAXQDA automatically inserts the “OR” operator. To use the “AND” operator instead, select the appropriate option in the right-hand pane. According to the schema, any number of other logical combinations can be added. Click the Activate button to begin.
In this way, you can add as many combinations of logical formulas as you want. You can then click Activate to start the activations.
The combination operators OR and AND have the following affect on the results of your activation process: If you choose the OR option, MAXQDA looks for documents that meet at least one of the various formulas’ criteria. If you entered the formulas “Criticism = Y” OR “Gender = F,” you will get all the documents that included critique of management as well as those that were women. For our example, then, the OR option would not be appropriate. We want both formulas to be met, so we would need to use the AND operator, so that it looks as follows:
It is possible to go back and delete a formula at any time:
- Click on the row you wish to delete.
- Click on the Delete button.
Using Code Variables for Activation by Code Variable
It is not only possible to activate documents based on their document variables; you can also activate codes based on their assigned code variables. The Activate by code variable function can be accessed by right-clicking on the Code System icon and choosing the appropriate option in the context menu that appears, or by clicking the icon in the “Code System” window toolbar.