Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Coding for multiple visits data


From   Tasha Amin <[email protected]>
To   <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index