Straight Line Checks

This article will show you how to program a Straight Line check


Background

Many times in Market Research projects programmers and analysts will want to clean out anyone who is marked as a "Straight Liner". This article will show you how to program a straight line check which will then allow you to have these individuals flagged or to terminate them on the fly. This process will allow you to have the cleanest data possible without having the download data and manually review and remove people manually throughout the fielding process. 


Assumptions

In these instructions we are assuming the grid is labeled "Q1".


Step 1: Program a 'Numeric Variable'

  1. Log into the 'Build & Edit Tool'
  2. Click on 'Variables' on the left
  3. Click on '+ Custom Variable'
  4. In the 'Variable Name' field, name your variable. 
    1. Best practice would be to name it something obvious. Lets say this set of variables was tied to "Q1", then you could name it "SL_Q1". This is your choice but having a consistent naming convention will help you throughout the programming process.
  5. In the 'Type' drop-down select 'Numeric'
  6. The shell of the variable will not be created and the variable card will now be open on the main screen
  7. Click on the 'Add Response' button and add 4 options and label them as follows
    1. Punch 1 - RANDOM VALUE ANSWERED
    2. Punch 2 - TOTAL OPTIONS ANSWERED
    3. Punch 3 - TOTAL OPTIONS WITH SAME RANDOM VALUE
    4. Punch 4 - SRAIGHT LINE (0=NO/1=Y)
  8. This part is now done

Step 2: Program Your Grid (if you haven't already)

  1. Program your radio row grid
    1. See article: Standard Question: Grid
  2. Add your row and column responses and update any settings as needed

Step 3: Adding Your Logic

  1. Add a 'Logic Block Page' after your grid
    1. See article: Logic Block Pages: Add a Logic Block Page
  2. Add 'Logic Loop' number one. This will be used to set the SL variables to zero to start. This will also help you while testing so you can go backward and have your variables reset.
    1. Always loop through your 'Numeric Variable'
    2. Set the same variable by formula "X" to "0"
    3. It will look like this: 
  3. Add 'Logic Loop' number two. Here we will be finding 
    1. Always loop through your grid
    2. Run Actions: Only if - TRY("Q1_" . X) !=""
    3. Set variable 1 of your SL variable to: TRY("Q1_" . X)
      1. This is getting one of the answers which are NOT blank to check against 
    4. Set variable 2 of your SL variable to: SL_Q1_2 + 1
    5. This is incrementing the second punch to the total number of rows answered. This will take filtering into account. 
    6. It will look like this:
  4. Add 'Logic Loop' number three. This will count how many rows have the same answer. 
    1. Always loop through your grid
    2. Run Actions: TRY("Q1_" . X) = SL_Q1_1
    3. This is counting how many items have the same answer to the one in the prior 'Logic Loop' in the third punch of your SL variable
    4. It will look like this:
  5. Add a regular 'Logic Block'
    1. Here you will check if punch 2 (total number answered) is equal to punch 3 (total with the same value). 
    2. Run Actions: Only if SL_Q1_2 = SL_Q1_3
    3. Then you will set punch 4 equal to 1. This means the respondent did straight line.
  6. Now you have some options:
    1. Add a logic block you can either setup a termination point 
    2. You can even create a separate variable to count how many times the respondent straight lined throughout the survey. This approach is sometimes used to count how many total quality checks were failed. Then you can add logic to terminate the respondent after failing three checks, as an example. 
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us