Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: RE: Re: Making panel format

From   "Md. Alauddin Majumder" <>
To   "" <>
Subject   st: RE: Re: Making panel format
Date   Thu, 11 Apr 2013 02:55:59 +0000

Dear Joseph Coveney,

Thank you so much for the help! I will try it.


From: [] on behalf of Joseph Coveney []
Sent: Wednesday, April 10, 2013 9:36 PM
Subject: st: Re: Making panel format

Md. Alauddin Majumder wrote:

I want to reshape the following data to make it panel:

ID status_1997january status_1997february . . . status_2010december


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:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index