Im having a problem with the xpose command.
I have two datasets one from 1996 and one from 2000 that are similar. I stat
transferred them from excel into stata (they are too large for Excel to transpose).
For 1996, the original dataset had 916 rows and 935 columns. When I transpose the
matrix, I get 767 rows instead of 935. I thought perhaps this was because in the
original data, the missing 168 entries contain only 0s. Perhaps STATA eliminates
them in the xpose process? It adds up.
However, when I do the exact same thing with the 2000 data, I start with 847 rows
and columns and end with the same number, despite having 231 columns of 0s in
the original data. I found out that the 0 columns are of data type byte in both
datasets. This makes me question my original hypothesis for the 1996 data and
wonder why it would drop those columns in one instance and not in another.
Here is my program (commid is a string that essentially is my identification for the
entries)
use 00total3b.dta, clear
rename commid _varname
xpose, clear varname
rename _varname commid
save 00totalnew.dta
_________________________________
Monica C. Schneider
PhD Candidate
Department of Political Science
University of Minnesota, Twin Cities
1414 Social Sciences
267 19th Ave South
Mpls, MN 55455