Introduction
This article describes how to create a binary variable from a variable selected by the user in the Data Sets tree, that contains either Number or Categorical variables. Displayr automatically does this by reassigning which output values are counted with positive values from the Number variables. And, for Categorical variables, the top half of the labels are counted by searching for the positive labels to count. For example, if the categorical labels are Yes and No, the Yes label will be counted. In larger categorical label structures, Displayr will count the positive statements in the top half. For example, for a 5 point scale question that has statements Strongly agree, Agree a little, Neither, Disagree a little, and Strongly disagree the binary transformed question will count Agree a little or Strongly agree.
In the example below the Nominal:
To a table that looks like:
Requirements
- You are required to select at least one question of the types Numeric, Numeric - Multi, Numeric - Grid, Nominal: Mutually exclusive categories, Nominal - Multi: Grid with unordered categories, Ordinal, Ordinal - Multi: Grid with ordered categories.
- If multiple questions are selected in the Data Sets tree for the transform, all of the variables must be of the same type.
- If the variables are Nominal or Ordinal, they must have the same label structure.
Method
To create new binary variable(s):
- Select the variables in the Data Sets tree.
-
- Selecting one or more Numeric questions will produce a Binary - Multi: Non-mutually exclusive categories output.
- Selecting one Numeric - Multi question to produce a Binary - Multi: Non-mutually exclusive categories output.
- Selecting two or more Numeric - Multi questions to produce a Binary - Grid output.
- Selecting one and only one Numeric - Grid question to produce a Binary - Grid output.
- Selecting one or more Nominal: mutually exclusive categories or Ordinal questions will produce a single Binary - Multi: Non-mutually exclusive categories output.*
- Selecting one Binary - Multi: Non-mutually exclusive categories question to produce a single Binary - Multi: Non-mutually exclusive categories output.
- Selecting two or more Binary - Multi: Non-mutually exclusive categories questions to produce a single Binary - Grid output.*
* If multiple categorical input questions are selected, then they must have the same label structure, with the same number of labels and in the same order.
-
- Either hover over any variable in your Data Sets tree > Plus (+) > Insert Variable(s) > Ready-Made New Variable(s) > Binary Variable(s) or else from the toolbar menu, select Anything > Data > Variables > New > Ready-Made New Variable(s) > Binary Variable(s).
- This will create a new variable set in the Data Sets tree.
See Also
Comments
0 comments
Article is closed for comments.