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]

Re: st: inserting new observations between two consecutive observations


From   James Bernard <[email protected]>
To   [email protected]
Subject   Re: st: inserting new observations between two consecutive observations
Date   Wed, 27 Feb 2013 21:18:57 +0800

Well, the panel is to long and there are a few other variables. I
would need to type every firm name again

On Wed, Feb 27, 2013 at 9:13 PM, Richard Goldstein
<[email protected]> wrote:
> why not just add them at the end (or anywhere else) and then sort by
> Firm Year?
>
> Rich
>
> On 2/27/13 8:06 AM, James Bernard wrote:
>> Hi all,
>>
>> I was wondering if you know of any way for adding new observations
>> between two consecutive observations.
>>
>> Firm           Year
>> --------         ----------
>> A               1990
>> A               1991
>> A               1992
>> B               1990
>> B                1991
>> B               1992
>> C                1990
>> C                 1991
>> C                  1992
>>
>> I want to add years 1993 and 1994 to the year, so it has to be
>> replaced between A-1992 and B-1990.
>>
>> I thought of -replace- command and using the loop (knowing that the
>> length for each panel is 3). but that would not work as it replaces
>> the observations. It does not insert.
>>
>> Any idea?
>>
>> Thanks,
>> James
> *
> *   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/
*
*   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/


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