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 at the end of May, and its replacement, statalist.org is already up and running.


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

AW: st: Creating extra observations within clusters of panel data


From   Peter Grand <grand@ihs.ac.at>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   AW: st: Creating extra observations within clusters of panel data
Date   Wed, 28 Mar 2012 17:44:50 +0000

Thank you very much!

Peter Grand
grand(at)ihs.ac.at
Institute for Advanced Studies
Stumpergasse 56
1060 Vienna

________________________________________
Von: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu]&quot; im Auftrag von &quot;Nick Cox [njcoxstata@gmail.com]
Gesendet: Mittwoch, 28. März 2012 19:38
Bis: statalist@hsphsun2.harvard.edu
Betreff: Re: st: Creating extra observations within clusters of panel data

<>

. help expand

bysort voter : gen toexpand = _n == _N
expand 2 if toexpand

Nick

On Wed, Mar 28, 2012 at 6:28 PM, Peter Grand <grand@ihs.ac.at> wrote:

> How can I create extra observations within clusters?  E.g. an existing data-set with vote-choices `nested in' voters (i.e. a data set in long format), say 5 choices for each voter. How can I create a 6th vote-choice for each voter? (Could be an observation with only missing values or a copy of an existing choice-alternative).

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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index