BookmarkSubscribeRSS Feed
djamming
Calcite | Level 5

Hi,

 

I am doing a research project examining the association between Vitamin A intake and CVD in Hispanic women.

 

I am using 5 datasets: demographics, smoking, medical conditions, total dietary intake, and body measures. I want to merge these data sets. However, the total dietary intake dataset would need to transform the detailed file into a person-level file (with one record for each person) before merging it with NHANES demographic and other data files by using  seqn as the unique identifier.

 

How can I do this in SAS? I have attached the total dietary intake dataset for reference. Thanks!

1 REPLY 1
ballardw
Super User

I didn't read every single one of 10,000 plus lines but I did not see any duplicates of SEQN until the bottom of the file where apparently something other than data appears in the last 5 or 6 lines. So you need to describe what is keeping you from merging the file.

 

I'm not going to read the entire documentation on the NHANES website to determine what any of that data represents or the problems involved. I would recommend searching the site carefully as I doubt that you are the first person to attempt such and there is likely to be example code there. Just may take some digging.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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