Sometimes surveys contain large loops. For example, each person may have been asked 10 questions about 10 concepts. If the raw data contains one row for each person, then this will often lead to many, many unnecessary calculations being performed and to a lot of difficulty in joining results from multiple variables. A much more efficient structure is to first stack the data file.
For example, if your original data looks like this:
then you might stack your variables like this:
and then your output data file would look like:
If you want to stack looped variables into item-specific variables (such as by concept, brand, or product) instead of iteration-specific variables (such as first asked about, second asked about, etc) within your currently unstacked data, see the Disentangling Piping and Looping article. Though, this does not increase the efficiency of your data file.