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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 681 views
  • 0 likes
  • 2 in conversation