Create New Variables - Rebase Multiple Response Data in Variable(s) to NET
This tool is used to rebase Pick Any and Pick Any - Grid questions which do not have missing values recorded for respondents who skipped the question in the questionnaire, leading to a NET which is less than 100%. Any respondents who do not have at least one selection in the question will be removed from the base, and so the NET will be 100%.
The tool makes a new copy of any questions that you choose to rebase, and you have the option of hiding the original questions if you no longer want to see them in your project.
Example
This example shows a SUMMARY table of an Unaided awareness question . As indicated by the NET, some respondents have not given any answers, but they have also not been recorded as missing data. If those respondents skipped the question in the questionnaire then we may wish to rebase the question to only respondents with at least one answer. The table to the right shows the result of rebasing using this QScript.
Technical details
This tool is intended to be used for multiple response data that has no Missing Data code. This is to correct for data files which have been created poorly, and it is usually better to ask the data provider to make sure that respondents who skip a question are marked as missing, according to the recommended specifications for SPSS data files, linked here: SPSS Data File Specifications.
If the script is applied to questions which already have missing data then respondents with no responses will still be removed from the base, but the base will not necessarily be the same as the original NET.
How to apply this QScript
- Start typing the name of the QScript into the Search features and data box in the top right of the Q window.
- Click on the QScript when it appears in the QScripts and Rules section of the search results.
OR
- Select Automate > Browse Online Library.
- Select this QScript from the list.
Customizing the QScript
This QScript is written in JavaScript and can be customized by copying and modifying the JavaScript.
Customizing QScripts in Q4.11 and more recent versions
- Start typing the name of the QScript into the Search features and data box in the top right of the Q window.
- Hover your mouse over the QScript when it appears in the QScripts and Rules section of the search results.
- Press Edit a Copy (bottom-left corner of the preview).
- Modify the JavaScript (see QScripts for more detail on this).
- Either:
- Run the QScript, by pressing the blue triangle button.
- Save the QScript and run it at a later time, using Automate > Run QScript (Macro) from File.
Customizing QScripts in older versions
JavaScript
▶ Show Code
See also
- QScript for more general information about QScripts.
- QScript Examples Library for other examples.
- Online JavaScript Libraries for the libraries of functions that can be used when writing QScripts.
- QScript Reference for information about how QScript can manipulate the different elements of a project.
- JavaScript for information about the JavaScript programming language.
- Table JavaScript and Plot JavaScript for tools for using JavaScript to modify the appearance of tables and charts.