Skip to content

Matrix question battery

Ask one set of items on a shared rating scale as a single matrix question, with the item order randomised per participant.

Use this when several items share one rating scale and belong together visually, as in a symptom checklist or frequency battery. Writing one form row per item repeats the same options over and over, takes more vertical space, and leaves you to randomise item order by other means. A single matrix row keeps the battery compact and shuffles item order per participant on its own. If the items need different scales or different response types, they must stay separate form rows.

typecontentheadresponseTyperesponseOptionsresponseRowsresponseRowsRandombutton1
instructionsYou will answer a short questionnaire about everyday habits.NEXT
formHow often did you do each of the following in the past week?radioNever;Once or twice;Most days;Every dayExercise for 20 minutes or more;Eat five portions of fruit or vegetables;Sleep at least 7 hours;Skip breakfast;Drink caffeine after 6pm1
formHow difficult was it to answer accurately?likertNot at all;Slightly;Moderately;Very
formWas anything about this week unusual for you?comment

A matrix is a single type=form row. responseType set to radio plus a filled-in responseRows cell turns the question into a matrix: each semicolon-separated responseRows entry becomes one row of the matrix, and the shared responseOptions become its columns. head titles the whole matrix. One trial-file row therefore carries the entire five-item battery.

responseRowsRandom set to 1 shuffles the row order once when the form is generated, independently per participant, which counterbalances item order. Two things follow from that. First, any non-empty value turns the shuffle on, 0 included; leave the cell empty to keep the written order. Second, the saved per-row responses follow the displayed (shuffled) order, joined with _, and are not unscrambled for you. The results file gets an extra responseRows_actual column recording the displayed order joined with ;, so you map each response back to its item by matching positionally against it.

Keep ; out of the row labels (it would split a label into extra rows and make responseRows_actual ambiguous) and keep the labels unique, because two identical labels collide and save only one value. A row the participant skips saves as NA in its own position rather than shifting the others.

The two follow-up questions demonstrate the other side of responseRows: without it, a form row is just a single ordinary question, and all three form rows here share one survey page because they are consecutive.

  • Allow several answers per item by switching responseType to checkboxes, the other matrix type; every other response type with rows renders a panel of repeated questions instead.
  • Force every matrix row to be answered before submitting by adding required with 1; without it, individual rows can be skipped and save as NA.
  • Shuffle the scale itself as well with responseOptionsRandom; rows and options shuffle independently.
  • Score each item by adding key with a ;-separated list of per-row expected answers; the recorded correctness is then a per-row string like 1;0;1;1;0.