Toggle navigation
Home
▼ Details
Products and pricing
Chart gallery
User stories
Text analytics
CDC NAMCS Library
Blog
Tutorials
Contact
Sign in
Post Editor
← All blog posts
View post
Save
<style> img { max-width: 500px; display: block; margin: 0 auto; } </style> <p>Surveys can contain "loops" where a subset of the survey is repeated several times per respondent. This is typical in new product assessments, employee satisfaction surveys, patient case research, and observational trials.</p> <p><img src="/images/blog/2018-07-14-loops/loop-qp-2.png" style="max-width: 540px"/></p> <p>You can choose whether to see survey loops "flattened" or "stacked". Which is best depends on your analysis goals.</p> <!--more--> <p>In this example, there's a main section of the survey that each respondent completes once, plus a case report form that each respondent completes for each of three patients:</p> <h2>"Flatten" loops</h2> Typically survey engines "flatten" the data for export. The data file contains one row per respondent and one column per question item. Multiple cases are represented by multiple data columns. In this illustration each square represents a cell in the data file. <img src="/images/blog/2018-07-14-loops/loop-data-flat.png"/> Flattening loops is best if they are to be considered independently. A flat data file makes it eash to show data for each question for each loop: <img src="/images/blog/2018-07-14-loops/loop-age-flat.png"/> <h2>"Stack" loops</h2> Another approach is to "stack" the cases vertically, so there is one row per respondent per loop. <img src="/images/blog/2018-07-14-loops/loop-data-stack-merge.png"/> It is often useful to the merge the main respondent data with each loop, as shown by the grey cells. This allows correlation between respondent-level variables and loop-level variables: Stacking is best when the loops are similar, and should be pooled for analysis. Here's the same example showing the cases stacked with the loop index as a profile variable for analysis. <img src="/images/blog/2018-07-14-loops/loop-age-stack.png" style="max-width: 600px"/> <h2>Loop data in SERMO</h2> <p>Protobi automatically recognizes loops in SERMO surveys. By default loops are flattened. Each loop is organized as an separate group, and included in a "pageable" tab. You can flip between cases by pressing the arrow keys.</p> <p><img src="/images/blog/2018-07-14-loops/loop-sermo.png" style="max-width: 500px; margin: 0 auto" /></p> <p>Your SERMO project can optionally be setup to stack and merge data automatically instead.</p> <p><h2>Program stacking logic externally</h2> You can program stacking logic yourself in R, SPSS or your favorite language. Just upload the new dataset and set that to be the primary dataset.</p> <p><img src="/images/blog/2018-07-14-loops/stack-upload.png" style="max-width: 300px; margin: 0 auto" /></p> <p><h2>Program stacking in Protobi</h2> Protobi has a rich language for data processing. A simple example of stacking data for three patient cases together is below:</p> <p><img src="/images/blog/2018-07-14-loops/loop-code.png" style="max-width: 500px"/></p> <p>Your study likely has more complexity and we can show you how to do it. The key thing is stacking code you might otherwise have your DP team write in R or SPSS can be done within Protobi, so your logic is all in one place, with version history, and can be run every time you upload new data.</p>
Date
Status
Published
Draft
Slug
edit
Thumbnail
Categories
Manage
Release
Features
Datasets
Surveys
Tips
NAMCS
Applications
Crosstab
Tutorial
Design
Concepts
Segmentation
Examples
Blog Test Category
Delete
Convert to MD