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]

st: Coding for multiple visits data


From   Tasha Amin <tamin_wh@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Coding for multiple visits data
Date   Fri, 8 Apr 2011 16:34:15 -0400


My data has multiple visits and is coded in the following way, where a person appears as a case=1 from visit 1.....(see first set of code), even though ID 1 should be case=1 from visit 6, after 2 successive 0's in RNA, ie SHOULD look like second set of code. How do I get case to accurately change at the right visit? Thanks!
 
Looks like:
ID visit RNA case
1 1 1 1       
1 3 1 1        
1 5 0 1  
1 6 0 1            
1 7 0 1 
2 1 1 0
2 2 1 0
2 3 1 0 
2 4 1 0
 
Want it to look like:
ID visit RNA case
1 1 1 0       
1 3 1 0        
1 5 0 1  
1 6 0 1            
1 7 0 1 
2 1 1 0
2 2 1 0
2 3 1 0 
2 4 1 0  		 	   		  
*
*   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