BookmarkSubscribeRSS Feed
rfarmenta
Obsidian | Level 7

I am managing data for a Prospective Research Study and we are conducting lab testing. We are drawing blood and we are keeping track of the number of vials that we are collecting on an electronic form. If we do not collect complete vials for a participant they have to return at a later date to finish the blood draw. When a participant returns we complete the same form again but only with those variables (vials) that were completed during the second visit. For participants that return we end up with two records for each of the variables. I need to combine the records to create one complete record with all of the blood draw data. What is the easiest way to do this? It is a procedure I have never had to do previously. Basically I need to say, if var1 (from the first visit) <var1 (from the second visit) then create a new var1 with the second visit data. if var1 (from the first visit) <var1 (from the second visit) then export var1, and then finally var1 (from the first visit) >var1 (from the second visit) then export var 1. I would need to keep all of the data and create a new complete data set.

I am not sure if what I am saying makes sense but I hope to get some help with this.

1 REPLY 1
robby_beum
Quartz | Level 8

Is all the data in one dataset,  two or more datasets?

Can you provide a sample of the data looks like and what you want the result to look like?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 328 views
  • 0 likes
  • 2 in conversation