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:
|Observation 1||Observation 2|
and then your output data file would look like: