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: Matching the closests dates of lab results across visists by patients


From   Miguel Angel Luque Fernandez <[email protected]>
To   <[email protected]>
Subject   st: Matching the closests dates of lab results across visists by patients
Date   Sun, 18 Dec 2011 09:00:59 +0000

Hi,
I have a hierarchical
 dataset of visits by patients.
I would like to match, using dates, the 
lab results with the date of the closest visit, moving the value
of the lab result to the row of the closest visit according to the lab 
and visit dates (i.e: lab value 382 have to be moved to the row of the 
visit 25-Dec-2008, see here below a dataset example)

Thanks a lot in advance,
Miguel Angel Luque Fernández


patient    lats_contatc_dmy    lab_dmy    CD4A
1015    31dec2007        
1015    30jan2008        
1015    29feb2008        
1015    30mar2008        
1015    29apr2008        
1015    29may2008    23dec2008    382
1015    28jun2008        
1015    28jul2008        
1015    27aug2008        
1015    26sep2008        
1015    26oct2008        
1015    25nov2008        
1015    25dec2008    26oct2009    429
1015    24jan2009        
1015    23feb2009    03jun2010    444
1015    25mar2009        
1015    24apr2009        
1015    24may2009        
1015    23jun2009        
1015    23jul2009        
1015    22aug2009        
1015    21sep2009        
1015    21oct2009        

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