How to use and create coding variables for continuum scales🔗

Whenever you have a scale that is on a continuum but it is expressed in words or phrases, you should add a variable that codes it numerically, as this will make data analysis much easier. You may want to add additional coding variables to capture other information that may be interesting for data analysis as well.

In general, you'll likely want to code as much as you can in GuidedTrack to avoid having to modify your data set later to create new coding columns (which tends to be more tedious, labor-intensive, and error-prone than coding them in GuidedTrack).

Good continuum scale question examples🔗

Here are some good examples of questions with continuum scales.

If you have a question that has similar answer options to other questions, we recommend defining an answer scale at the start so that you only have to code the variables numerically once for the whole set of questions. For example, for questions where you're asking participants if they agree or disagree, you could code each level of (dis)agreement as a separate number, like this:

>> agreementScale = [["Totally agree", 3], ["Agree", 2], ["Somewhat agree", 1], ["Neither agree nor disagree", 0], ["Somewhat disagree", -1], ["Disagree", -2],	["Totally disagree", -3]]

*maintain: Please indicate the extent to which you agree or disagree with the following statement.

*question: I sympathize with others' feelings.
	*answers: agreementScale
	*save: sympathize

*question: I am not interested in other people.
	*answers: agreementScale
	*save: disinterestInOthers

*clear

For more examples like the one above, see here. In other situations, you may want to define some variables that will only apply for one question at a time, and you may have a different value for each option chosen. Here is one such example:

>> drinksMoreThanOnceWeekly = 0

*question: How often do you drink alcohol?
	Never
		>> alcoholFrequencyScore = 0
		>> alcoholEstimatedTimesPerYear = 0
	A few times per year
		>> alcoholFrequencyScore = 1
		>> alcoholEstimatedTimesPerYear = 2
	Approximately once a month
		>> alcoholFrequencyScore = 2
		>> alcoholEstimatedTimesPerYear = 12
	Approximately once a week
		>> alcoholFrequencyScore = 3
		>> alcoholEstimatedTimesPerYear = 52
	Twice a week or more
		>> alcoholFrequencyScore = 4
		>> drinksMoreThanOnceWeekly = 1
		>> alcoholEstimatedTimesPerYear = 104
	Approximately every day
		>> alcoholFrequencyScore = 5
		>> drinksMoreThanOnceWeekly = 1
		>> alcoholEstimatedTimesPerYear = 365

In the example above, note how alcohol consumption has been coded in multiple ways to support different types of analyses we may want to do on the data later. If we knew we wouldn't need all these variables, then we wouldn't need to introduce them all; but they can be helpful if you want to keep your options open for different approaches to data analysis.

Here's another example:

*question: What is the total amount of income in U.S. dollars made by your *entire household* last year (before taxes)?
	Less than $9,999
		>> householdIncomeScore = 0
		>> householdIncomeEstimate = 5000
	$10,000 to $24,999
		>> householdIncomeScore = 1
		>> householdIncomeEstimate = 17500
	$25,000 to $39,999
		>> householdIncomeScore = 2
		>> householdIncomeEstimate = 32500
	$40,000 to $59,999
		>> householdIncomeScore = 3
		>> householdIncomeEstimate = 50000
	$60,000 to $84,999
		>> householdIncomeScore = 4
		>> householdIncomeEstimate = 75000
	$85,000 to $114,999
		>> householdIncomeScore = 5
		>> householdIncomeEstimate = 100000
	$115,000 to $149,999
		>> householdIncomeScore = 6
		>> householdIncomeEstimate = 132000
	$150,000 to $199,999
		>> householdIncomeScore = 7
		>> householdIncomeEstimate = 175000
	$200,000 or more
		>> householdIncomeScore = 8
		>> householdIncomeEstimate = 200000

In both of the examples above, note that information is lost when you ask the participant to select a range instead of inputting a number; however, in the case of both alcohol intake and household income, for the purpose of many surveys, it can suffice to ask them to select the range in which their answer falls rather than providing the option to input an exact number (especially considering the difficulty that people may have in giving precise estimates).

Bad continuum scale question example🔗

Now, here's a bad example that uses unclear options that are difficult to analyze:

*question: How often do you drink alcohol?
	Never
	A few times per year
	Approximately once a month
	Approximately once a week
	Twice a week or more
	Approximately every day

The question above will produce data that is very hard to analyze afterward.


Next: