A Sparser, Speedier Reshape. (September 2016) - Simons, Kenneth L.
A new command, sreshape, supports sparse and speedy reshaping of data. Often reshaped data are "sparse" in the sense of containing many missing values that are dropped after reshaping.sreshape automates the process of reshaping and dropping such missing information to avoid potential errors and, for both sparse and nonsparse data, yields speed improvements. Using large test datasets, sreshape achieves identical results toreshape 8 to 31 times faster in wide-to-long reshapes and 2 to 13 times faster in long-to-wide reshapes. Further suggested improvements may allow StataCorp to increase these speed gains in the built-in version.