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, statalist.org is already up and running.


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

st: inserting new observations between two consecutive observations


From   James Bernard <jamesstatalist@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: inserting new observations between two consecutive observations
Date   Wed, 27 Feb 2013 21:06:55 +0800

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/


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