Toggle navigation
Home
▼ Details
Products and pricing
Chart gallery
User stories
Text analytics
CDC NAMCS Library
Blog
Tutorials
Contact
Sign in
Post Editor
← All help posts
View post
Save
<img src="/uploads/upload/image/5200/direct/1595435610236-1595435610236.png" alt="Protobi logo icon in purple and gray." style="width: 408px;" class="fr-fic fr-dib"> Surveys sometime contain "loops," sub-sections of the survey that are repeated several times. This is common in product concept testing and patient case reviews: ## What are survey data loops? Loops are a sequence of repeated instructions. For example, a survey might ask a physician to answer questions for three patient cases. The survey asks questions for patient case 1, then repeats the same questions for patient case 2, etc. <img src="/uploads%2Fupload%2Fimage%2F5200%2Fdirect%2F1612466946024-1612466946024.jpeg" alt="Survey flow diagram showing three patient cases (Case 1, Case 2, Case 3) with identical question sets Q1, Q2, Q3 repeated for each case. Arrows indicate sequential flow through each case's questions." style="box-sizing: border-box; border: 0px; max-width: calc(100% - 10px); cursor: pointer; padding: 0px 1px; color: rgb(56, 76, 96); font-family: sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; width: 632px;" class="fr-fic fr-dib"> ## Flatten vs stack Survey data loops can be represented as flatted data or stacked data. Protobi can represent both structures. **Flattened** data has one row per respondent, and one column per question per loop: <img src="/uploads/upload/image/5200/direct/1571199988939-1571199988939.png" alt="Spreadsheet showing flattened loop data with columns for RespondentID and multiple columns per question (B1.1, B1.2, B1.3 for patient cases). Each respondent has one row with answers spread across multiple columns." style="width: 661px;" class="fr-fic fr-dib"> **Stacked** data has one column per question and one row per respondent per loop: <img src="/uploads/upload/image/5200/direct/1595291480523-1595291480523.png" style="width: 570px;" class="fr-fic fr-dib"> Clients often ask us to stack data with flattened patient cases. [Stacking can be done programmatically in the tool](/process-data/stack-patient-cases). Survey loops are appended vertically--similar to [stacked waves](/process-data/combine-data-using-a-simple-stack) of data. Data for each patient case (B1.1, B1.2, etc.) is put in a single stacked data column (B1). Below is a PDF with a more detailed discussion... ## Download [survey-loops-protobi.pdf](/uploads%2Fupload%2Fimage%2F5200%2Fdirect%2F1571169768138-survey-loops-protobi.pdf)
Publishing
Date
Status
Published
Draft
Slug
edit
Content
Thumbnail
Categories
Manage
New to Protobi?
Charts
Making Changes
Intermediate topics for editors
Frequently Asked Questions
SERMO Topics
Tutorial Pages
Internal Docs
Data Processing
Videos
Obsolete
GSG Admin
SERMO Admin
GSG Topics
How to...
Basics for viewers
Basics for editors
For project admins
Advanced topics
Assessments
Articles (in-progress)
New and updated articles
Process data in Protobi
superseded
Text open-end questions
Troubleshooting
Tracking studies
Organizing the view
API References
Tools
AI Database
Checking AI...
Convert to MD
Danger zone
Delete