How To Build A Survey: Repeated Measures
What is a "repeated measure"?
A repeated measure is a question or group of questions that you ask many times (usually more than twice). For example, if you wanted to know the variance of the temperature of a room over a day, you'd ask a question like this, every half hour.
If you asked it once, you'd have a single "measure" (the question), asked just once. Asking this question every half-hour means you have many measures, asking the question "repeatedly", or a "repeated measure."
How To Implement A Repeated Measure
There are two ways to implement a repeated measure. How you choose to do it in the questionnaire is up to you.
Technique 1: Repeat the question in the Survey Editor
You can do this if, and only if:
- You know exactly how many times you want to ask a question, and it's a small number (less than 10 or so, depending upon how much effort you want to put into typing the question repeatedly)
- You'll ask every person the question that many times
- You want the data to come out in a spreadsheet with one row per user, and each repeated measure as a different column (a different variable name)
If that's all true for you, you can simply create many questions in the Survey Editor and give each one a different variable name, e.g. "temperatureTime1", "temperatureTime2", "temperatureTime3", etc. If not, use Technique 2.
Technique 2: Use "Repeated Measures" in JSP
You can do this, if you:
- Want to put the repeated measures in a different database table (required -- makes one row per response, many rows per user)
- Are willing to write a little bit of Java code and edit the JSP files
To set up a repeated measure:
Part 1: In The Survey Editor
- Create a new page in the survey editor
- Double-click the page's yellow tab/arrow, to open the Page Wizard. Click "New Table", and then type a descriptive name for your repeated measure questions.
- Create all the questions you want to ask repeatedly in this page.
- Go to
Part 2: In JSP
- If you haven't already read the documentation on How to Use JSP and How to Use surveypage, read them now.
- Create a jsp file (copy page1.jsp, etc.) to be your new repeated measures page. Set up the surveypage tag to load the new page you created above. Test your survey to make sure it works (as a single page, not as a repeated measure yet).
- Modify the surveypage tag to add in a few new parameters:
|
Parameters to add:
|
|
repeatedMeasure=...
|
|
|