Statalist


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

st: add new record for individual in dataset


From   Marcus Casey <mcasey@duke.edu>
To   Statalist Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: add new record for individual in dataset
Date   Tue, 27 Oct 2009 17:09:08 -0400

Hi,

Does anyone know how I can add a new record for an id in a long form  
dataset?
Specifically , I have a dataset with the following structure

id	begin 	end		cens
1	1997	2006	   0
2 	1997	2003	   0
3	1997	2004	   0
3	2004	2007          0
4	1997	2006	   0

and I want to add an additional record for each id in the following  
manner

id	begin	end		cens
1	1997	2006	    0
1	2006	   .		    1	
2  	1997	2003           0
2      2003	    .   	    1
3	1997	2004   	    0
3	2004	2007	    0
3	2007          .		    1
4	1997	2006	    0
4	2006	   .		    1


Thanks in advance

Regards,
Marcus



*
*   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   |   What's new   |   Site index