BookmarkSubscribeRSS Feed
malena
Calcite | Level 5

working with the state birth file and want to create an id each year that  that links a mother and infant. When the mother has more than 1 infant on the same delivery, they should all be assigned this ID. So I was basing this random ID on the mother full name and DOB of infant, but then I realized there might be instances when infants are not born on the same day (sometimes one day after). How can I account for that?

 

I have certificate number, mothers first name, last name, DOB and infants first name, last name and IDOB

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Show us a portion of this data set, using these instructions.

--
Paige Miller
PGStats
Opal | Level 21

Use the date from the first infant born to generate the ID.

PG
ballardw
Super User

@PGStats wrote:

Use the date from the first infant born to generate the ID.


And only increment a counter if the second birth is within a short interval. Not up on the biology but doubt if the second live birth occurs more than 24 hours later.

 

Or look much closer at the data set, I would suspect there is already something along those lines in the data, possibly hidden in a birth certificate number or similar. I don't have all my references but I think, at least for US birth certificates, there is a field related to order of delivery in a multiple birth.

 

You say that you have "certificate number" but that data set does not show any variable of that name or labeled as such.

What is the "newid2" supposed to be? Is that the result of your attempt? Or is it the certificate number? If so, look at it closely.

 

Purpose of this variable is what?

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 915 views
  • 0 likes
  • 4 in conversation