Data Implications of Loops

Home / DatStat Illume Product Documentation / Looping / Data Implications of Loops

When utilizing the loop object in a survey it is important that you are informed of the implications of using loops on the structure and format of your dataset.  Loops create a stacked univariate dataset, meaning that a single set of variables is exists in the datatable, and a new row is added to that table for every time the respondent iterates through the loop.

For example, in the screenshot below, we see a data export from a survey asking about the number of people in a residence, and a number of questions about each resident are contained in a loop.  This screenshot shows that there were two submissions.  For the first respondent (submission ID “3”), he had 2 family members.  The second respondent (submission ID “4”) had 2 family members.  Thus 5 rows were created in the data table.  The question “RESIDENCEMEMBERS” is not contained in the loop.  The response to that item is simply repeated in each row.



As visible in this screenshot, a DatStat Internal variable is created when a loop is included in survey, called DATSTAT.LOOPNAME.LOOP, where LOOPNAME is the name of the loop (in the screenshot, the loop name is RESIDENCEMEMBERS.  This variable provides the iteration number for each time the respondent iterates through the loop.

Note that the Data Manager interface, where data are downloaded, does not provide a mechanism for “unstacking” the data.