Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Yuval Arbel <yuval.arbel@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: How to add additional rows to a panel? |
Date | Wed, 14 Aug 2013 12:00:21 +0300 |
Thanks Nick. It worked fine. Actually - the objective of this exercise is very important: it is designed to provide projections for policy makers On Wed, Aug 14, 2013 at 10:49 AM, Nick Cox <njcoxstata@gmail.com> wrote: > 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 > njcoxstata@gmail.com > > > On 14 August 2013 07:56, Yuval Arbel <yuval.arbel@gmail.com> 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/ -- Dr. Yuval Arbel School of Business Carmel Academic Center 4 Shaar Palmer Street, Haifa 33031, Israel e-mail1: yuval.arbel@carmel.ac.il e-mail2: yuval.arbel@gmail.com You can access my latest paper on SSRN at: http://ssrn.com/abstract=2263398 You can access previous papers on SSRN at: http://ssrn.com/author=1313670 * * 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/