Displayr automatically chooses how to analyze data based on the properties of the variable sets such as its Structure and Value Attributes. Sometimes you may want to analyze the same data in different ways, in which case you may want different versions of the same variable with modified data properties. This article describes how to combine, split, duplicate, change the structure of, change the values of, reset, and create new variable sets. For tips on how to review how the data is currently setup or modified, see How to Review Data in Tables and Variables.
- Combining and splitting variable sets
- Duplicating variable sets
- Changing the structure of a variable set
- Changing the values of variables (recoding Value Attributes)
- Reset
- Creating new variables
Combining and splitting variable sets
Variable sets can be grouped together, by selecting them, right-clicking, and selecting Combine. They can be split into multiple variable sets, each of which contains one variable, by right-clicking and selecting Split.
Duplicating variable sets
It can be useful to have multiple versions of the same data. For example, maybe you want to show age in some analyses with all its categories, and in other analyses grouped into Under 45 and 45 or more. This is done by right-clicking a variable set and selecting Duplicate, and then modifying the duplicate as per your needs.
Some new users are reticent to do this, as they fear that the app will slow down as the resulting data file gets larger. However, duplicating a variable set does not duplicate the underlying data, so this concern isn't justified.
Changing the structure of a variable set
As a quick recap on the previous section describing Variable Sets, the structure of a variable set (in the object inspector > Data > Properties > Structure field) determines how it is shown in a table and analyzed, see all the examples in the Variable Set Structure section here. You can change the structure of a variable set to perform different types of analyses. The table below summarizes an Ordinal - Multi variable set, showing rating categories across brands.
Sometimes it is useful to restructure variable sets that show as multiple rows and columns so the data is more readily crosstabbed with banners and other variable sets. For example, you can show a Top 2 Box of the percentage of people who selected Love or Like (a Top 2 Box) by going to Data > Properties in the object inspector and changing the variable set's Structure to Binary-Multi. Then from the object inspector, click Select categories from Data > Properties and tick Count This Value for Like and Love categories. See How to Create Top Two Category Variable(s) (Top 2 Boxes) for more detail.
We can also see the average of the numeric ratings instead of percentages for each rating category by changing Structure > Numeric - Multi:
Changing the values of variables (recoding Value Attributes)
In the Variable Sets article, you learned how Value Attributes are used in calculations. You can modify these Value Attributes as needed to ensure your calculations are being performed as expected. This is especially important when you are working with a data set that did not have metadata, as the underlying Values for categories are arbitrarily assigned.
For example, the variable set above may be on a scale of 1 to 5 or -2 to 2. These two scales would give you very different averages. You can confirm and change the settings to whatever you want through object inspector > Data > Properties > Values.
You can edit all of this information in the window directly or use the Export and Import buttons to copy and paste the information to Excel for faster editing. Hovering over a label or value will show you the original as it was on Import. You can always reset the Value Attributes to their original state by clicking on Data > Properties > Reset in the object inspector.
Reset
You can reset the various attributes of a variable set by selecting the variable and clicking the Reset button.
Creating new variables
In addition to creating new variable sets by duplicating and modifying them, you can also create new variables by clicking the floating + button that appears when you hover over variables in the Data Sources tree, as shown below. Common ways of creating new variables include:
- Ready-Made New Variables, which contain the most common ways of creating new variables. For example, the recording below shows the creation of an NPS variable.
- Custom Code, which involves creating variables using the R and JavaScript languages.
- Text Categorization, which involves converting text data into categorical or numeric variables.