Displayr automatically chooses how to analyze data based on the properties of the variable sets, such as their 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 set up 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 Properties > Data > Attributes > Structure field) determines how the data is shown in a table and analyzed, see table of all structures here. You can change the Structure of a variable set to perform different types of analyses, but keep in mind that sometimes you may need to convert the data into new variables to make it suitable for a given Structure, see Creating new variables below. An example of changing the Structure directly for the current variable set is showing only the Top 2 Box, which is more readily crosstabbed, for a question instead of the whole scale. The table below summarizes an Ordinal - Multi variable set, showing rating categories across brands.
To instead show just the percentage of people who selected Love or Like (a Top 2 Box) in a table, you will change the Structure by going to Data > Attributes in Properties and changing the variable set's Structure to Binary-Multi. Then, from Properties
, click Categories from Data > Attributes and tick Count This Value for Like and Love categories. See How to Create Top Category Variable(s) (Top 2 Box, Top 3 Box, Top K Box) for more details.
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 Properties > Data > Attributes > Values & Labels.
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 > Attributes > Reset in Properties .
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. You may also need to create new variables so the data is in a format more appropriate for a given Structure, such as converting a single categorical (Nominal) variable into a variable set with a variable for each category in a (Binary-Multi) that can be used for filtering. Common ways of creating new variables include:
- Convert To, which contains common ways of creating new variables. For example, the recording below shows the creation of a Top 2 Box variable.
- Numeric Transformation, which includes creating midpoint categories and calculating NPS.
- Custom Code, which involves creating variables using the R and JavaScript languages.
- Text Categorization which involves converting text data into categorical or numeric variables.
Next
Creating and Modifying Visualizations
Manipulating Data video