BookmarkSubscribeRSS Feed
cris17
Calcite | Level 5

Hi SAS communities,

 

I match merged 4 data sets into one. There should only be 1 observation per person, which includes the most recent visit. One data set had a Birth Date variable and another data set had a Visit Date variable. After merging all 4 I then had to create a new variable that shows what age the person was between Birth date and Visit Date. Below is my code and I think I did the code correctly, but in the log, it shows that 2 out of the 573 are missing data. I checked the data sets and they show both the Birth date and Visit date. It could possibly be the way I also made the 4 data sets, but want to know ifs a simple coding mistake. Below is my code and a screenshot of the partial log.

 

 

Screen Shot 2020-12-06 at 6.43.32 PM.png

 

Let me know if you need more information

Thank you.

1 REPLY 1
PaigeMiller
Diamond | Level 26

The log clearly shows that VisitDt is missing for these two observations.

 

it may be that when you merge these data sets, a missing VisitDt in one data set overwrites a non-missing VisitDt from another data set.

 

In the future, please post log as text (not screen capture) by pasting it into the window that appears when you click on the </> icon.

--
Paige Miller

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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