For a project we received a data set containing biomarker measurements from a number of physician visits for each subject. Not all variables of interest are present at each visit and we were wanting to create a new data set containing the values from the most recent visit that measure was taken at. I'm not sure how or if it is possible to set this up. To give a bit more detail about what I would like to do, for each subject I would like to find a way to check if a measure has a value from the most recent visit date (i.e. 25AUG2015). if there is one keep that value(BMI=30) in the new data and stop searching for that variable in that subject. If not (BMI=.) go back to the next most recent date (16AUG105) and check there and so on. I'm not real sure where to start on this issue so any help would be appreciated. Please let me know if I can clarify more and thank you all in advance.
... View more