Stack or Reshape Data
This article is part of The Definitive Guide to Importing and Preparing Data.
Stacking is a process where data is transformed, and variables (columns) can be rearranged to act as cases (rows). This is sometimes called hierarchical data.
For example, if you ask each respondent about 5 different occasions, then you may like to stack the data so that each row in the new dataset is an occasion. In this case, if you had 500 rows in your original dataset, you'll end up with 2,500 rows in the stacked data. Another example is where the same rating scale is applied to different brands and you want to analyze it with each case representing a different brand (rather than a different respondent).
In the web app
- Stacking (and its opposite, which is called widening) is not available in the Crunch web app.
Using R
- If you are an expert user of R, you may be able to stack the respondent-level data using R, and storing this as a dataset. The Crunch R package does not provide any specific support for this. However, this article provides an example using a function from another package.