This article describes how to use a built-in QScript to improve the names of the questions in your data by searching through the text of the original labels in the data file. In some cases, the names supplied in the metadata of a data file contain less information than the label text. This tool can find and replace that information for you to create better names.
Requirements
A data file loaded in Q
Method
To run this QScript:
- Select Automate > Browse Online Library > Preliminary Project Setup > Suggest Better Question Names from Source Labels.
- You'll be prompted to select questions from a list that you want to try to obtain better names for.
Select the questions you want to try to improve and click OK. - Next, you'll see a list of potential name improvements from which to choose from. Select the questions you wish to modify from the list presented and click OK.
Note that if the suggested names are not meaningful then it is likely that the labels in the file do not contain better information for naming the questions.
In the following example, we have a question that has been called q10 in the raw data file, but we can see in the Source Label column that the original labels in the data file contain better information about what the question asked, namely the text 'Q10. Why drinks more than one cola'. As this text is more informative, we can use this QScript to rename q10 to 'Q10. Why drinks more than one cola' automatically.
Additional details:
It is usually better to instruct your data provider to add appropriate question text to the Set Label of the Multiple Response Set in the SPSS file because Q uses this text as the Question Name. In some cases, for example in older data processing software like Quantum, it is not possible to change this, and so this QScript can be used to get a tidier layout in Q. If your data provider does have control over these aspects of the formatting in the SPSS file then you should ask them to use the data file specifications linked here: How to Format an SPSS File for Use in Q.
This QScript searches the Source Label of each of the variables in the selected question to find text that is common at the start and the end of the label. If the labels have been truncated, which happens with some older data processing software, then this script will identify the longest common label suffix which shares text with the other label suffixes. That is, the script can still work even when the labels are truncated. In most cases, truncated labels in the data file will show up as messy labels in the Variables and Questions tab and on your tables.
Next
How to Use Scripts to Automate Data Checking and Cleaning
How to Check for Errors in Data File Construction
How to Identify Questions with Straight-Lining/Flat-Lining
How to Create New Variable(s) with Outliers Removed
How to Hide Uninteresting Data
How to Remove Truncated Text from Variable Labels
How to Reverse Scales in Questions