Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: reshape data


From   Tyler Frazier <[email protected]>
To   [email protected]
Subject   st: reshape data
Date   Sat, 24 Jul 2010 14:02:49 -0400

I am trying to reshape a set of data such that

bldg_id       No_jobs       zone_id        bldg_type
1                    3                  2                 1
2                    4                  2                 1
3                    2                  1                 2
4                    2                  2                 3


becomes


job_id             bldg_id           zone_id        bldg_type
1                         1                   2                   1
2                         1                   2                   1
3                         1                   2                   1
4                         2                   2                   1
5                         2                   2                   1
6                         2                   2                   1
7                         2                   2                   1
8                         3                   1                   2
9                         3                   1                   2
10                       4                   2                   3
11                       4                   2                   3

in spss this was fairly simple, but I can't seem to get the command
right in Stata

isn't it reshape? bldg_id, zone_id and bldg_type are all strings

thanks,
Ty
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index