Md. Alauddin Majumder wrote:
I want to reshape the following data to make it panel:
ID status_1997january status_1997february . . . status_2010december
[snip]
Is there any way to do this? Any help will be greatly appreciated.
--------------------------------------------------------------------------------
You could try something like the following.
reshape long status, i(ID) j(discard) string
generate int yearmonth = monthly(substr(discard, 2, .), "YM")
format yearmonth %tm
drop discard
Joseph Coveney
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/