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: How to add additional rows to a panel?


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: How to add additional rows to a panel?
Date   Wed, 14 Aug 2013 08:49:52 +0100

The only reason I can think of for doing this is so that you can type
in extra data. If so, why not type in the extra data to a new dataset
and then -append-? That is the least extra code I can imagine.

You could also do something with -expand-. starting

bysort id (time) : gen last = _n == _N
expand 120 if last

but then you still have work to do on every variable except -id-.

Nick
[email protected]


On 14 August 2013 07:56, Yuval Arbel <[email protected]> wrote:

> I have an unbalanced panel with 38,872 apartments and up to 114
> periods. I would like to add 120 empty rows at the end of each panel.
> I wonder what is the most efficient way to do this
*
*   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