What is the Difference Between Question Type and Variable Type

From Q
Jump to navigation Jump to search

For each row in the Variables and Questions tab you will see menus to change the Question Type and the Variable Type. The Variable Type is a property of each individual variable, and the Question Type is a property of the question into which the variable is grouped. The Question Type is usually the more important property to change, as it has a much greater impact on how Q will display and analyze your data. This article describes the aspects of Q which are affected by these two properties.

Question Type

The Question Type is a way for you to communicate to Q how you want a set of variables (a question) to be interpreted. A description of the types of questions and how they relate to the kinds of questions that you would ask in a survey can be found here.

The Question Type determines:

  • The layout of the table. For example, a SUMMARY table for a Pick One question will have one one row for each category, whereas a SUMMARY table for a Number question will feature a single row.
  • Which statistics will be available on a table which uses this question. For example, a SUMMARY table showing a Pick One question will show the % statistic in the cells first, whereas a SUMMARY table showing a Number question will instead show the Average statistic, and will not even have the % available.
  • What statistical test will be used in the table. For descriptions of the tests used for different types of tables, see Reading Tables and Interpreting Significance Tests.
  • What options will be shown in the Value Attributes. For example, most questions will give the option of setting Values, Labels, and Missing Data, but Pick Any and Pick Any - Grid questions will instead show the Count this value section for choosing which codes will be counted in the table, and Date questions will show the options for date Aggregation.
  • How the rows and columns of a table can be interacted with. For example, it is not possible to merge the rows of a Pick One - Multi question.
  • Whether or not the question will be available to use in a Banner. For example, Pick One and Pick Any questions can be placed in a banner and will appear as they do in a SUMMARY table, but Pick One - Multi and other grid questions cannot - only the individual variables from those questions may be used.
  • Whether or not the question can be used by a QScript, R Output, or a ready-made formula.
  • Which chart types are compatible with the question. For example, the time series chart requires a Date question.
  • How the data from the question will be used by Segments, Regression, and other statistical techniques.
  • How the variable will be communicated to R when used in an R Output.
  • How the data from the question will appear in the Data tab. For example, the data from a Pick Any or Pick Any - Grid question will always be shown as values of 1, 0, and blank, regardless of the original values present in the raw data.

In addition, only Text and Text - Multi questions can be used in coding.

Variable Type

The initial Variable Type of each variable is inferred from the properties of the raw data, and these are then used by Q to determine the initial Question Type for each group of variables during the data setup stage. Subsequently, the choice of variable type has some effects, including the following: