I share David Elliott's concerns here.
This does not seem a well posed problem to me, quite apart from appearing a very weird request without some rationale.
First, the example contradicts the description. In your example, individuals end up with 2 events each.
Second, what rule do you have for expanding your events to 4 each? If individuals have 1 event each, that could be copied three times. But if individuals have 2 or 3 events each, which is to be copied to fill out the data?
More generally, as I can't see that data management here can (or should purport to) create information that doesn't exist, it would be interesting to know the problem behind this problem, as I guess there's a better solution to it than this.
Nick
[email protected]
Rodrigo Briceño
I have a database of individuals with have suffered
from some events (muscular pain). The maximum amount of events an
individual could suffer in the database is 4. What I need is to copy
the information available (the row of data for each individual) the
number of times required, so those individuals that have 3, 2 or 1
event, end in the new database with 4 events all. So for example
(maximum number of events is 2 in this case):
old database:
id event x
1 1 30
2 1 15
2 2 15
new database
id event x
1 1 30
1 1 30
2 1 15
2 2 15
I'm using stata 9 and my OS is windows vista. Thanks for your help.
*
* 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/