A sparser, speedier reshape
Kenneth L. Simons
Department of Economics
Rensselaer Polytechnic Institute
[email protected]
|
Abstract. 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 to reshape 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.
View all articles by this author:
Kenneth L. Simons
View all articles with these keywords:
sreshape, reshape, sparse data, missing data, long form, wide form, data management, speed
Download citation: BibTeX RIS
Download citation and abstract: BibTeX RIS
|