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: FW: add 3 quarters


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: FW: add 3 quarters
Date   Wed, 2 May 2012 20:19:06 +0100

You could use -expand- for this. But if every variable but time is
unchanged, what's the point?

If this is preparatory to a -merge- with a dataset of quarterly data,
-merge- will do the work for you.

Nick

On Wed, May 2, 2012 at 8:10 PM, Agnieszka Trzeciakiewicz
<agazto@gmail.com> wrote:

> I have a dataset which contains an information on individuals and traces the
> period of a record in quarters.
> There are two variables in the dataset: “ID”, and “time”
>
> I would like to generate additional 4 rows for each observation, and the
> only variable that I need to change with added rows  is time variable which
> should equal  time – 1quarter, time -2 quarters,, time-3 quarters and time
> -4 quarters.

*
*   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